pytorch-yolov3调试记录

较全面的博客:

https://blog.csdn.net/c2250645962/article/details/104869015

https://blog.csdn.net/a586351/article/details/102964546?utm_medium=distribute.pc_relevant.none-task-blog-baidujs-3

TypeError: ‘NoneType’ object is not subscriptable. 解决

原因:数据导入时少给了数据的标签,导致数据没有标签。

解决办法:1.移除没有标签的图像或给图像加上标签。

                  2.将datasets.py中的

if self.augment:

改为:

if self.augment and targets is not None:

 

你可能感兴趣的:(pytorch-yolov3调试记录)