bug
文章平均质量分 53
ting♡
无脑学编程,记录,学习
展开
-
【bug】 IndexError: Target 255 is out of bounds.
输出与标签数不一致,导致在计算loss时报错Target N is out of bounds。原创 2022-11-04 16:56:45 · 1967 阅读 · 6 评论 -
【bug】RuntimeWarning: invalid value encountered in divide iou = .......
numpy,seterr()函数及其用法原创 2022-11-29 11:25:08 · 7162 阅读 · 0 评论 -
【warning】UserWarning: The parameter ‘pretrained‘ is deprecated since 0.13 and may be removed
就是参数列表中的pretrained在新版本中被弃了,要使用weights这个参数。然后教你用新的参数。就按照watning里写的把models.resnet101()后面的内容重新设置就好。原创 2022-11-19 19:24:06 · 7971 阅读 · 3 评论 -
【bug】 ImportError: cannot import name ‘soft_unicode‘ from ‘markupsafe‘
【bug】 ImportError: cannot import name ‘soft_unicode‘ from ‘markupsafe‘原创 2022-10-27 09:26:36 · 166 阅读 · 0 评论 -
【bug】AttributeError: ‘tuple‘ object has no attribute ‘size‘
AttributeError: 'tuple' object has no attribute 'size'可能性summary的一个bug,需要升级数据输出类型出错,Tensor或Tuple数据的输出和输入设置没有对应原创 2023-05-12 10:05:05 · 6699 阅读 · 3 评论 -
【bug】 RuntimeError: unexpected EOF, expected 2732223 more bytes. The file might be corrupted.
【bug】 RuntimeError: unexpected EOF, expected 2732223 more bytes. The file might be corrupted.需要把损坏的删除,再重新下载即可。原创 2023-04-27 17:51:32 · 677 阅读 · 0 评论 -
【bug】torch.nn.Softmax()报错.UserWarning: Implicit dimension choice for softmax has been deprecated
翻译一下,就是说用户警告:已弃用softmax的隐式尺寸选择。将调用更改为包含dim=X作为参数。torch.nn.Softmax(dim=1)可参考这篇文章,有图,挺清晰。,即在第1维上概率sum=1。原创 2023-04-18 11:56:14 · 399 阅读 · 0 评论 -
【bug】TypeError:can’t convert cuda:0 device type tensor to numpy.
numpy不能直接读取CUDA tensor,需要将它转化为 CPU tensor。如果想把CUDA tensor格式的数据改成numpy,需要先将其转换成cpu float-tensor之后再转到numpy格式。在CPU上是正常运行的,然后用GPU的时候就出现了这个报错。会出现新的报错,记得把括号加上!他已经告诉我们修改方法了,要先把。改成这个样子就好了!原创 2023-04-10 10:53:49 · 510 阅读 · 0 评论