IndexError: list index out of range on Training

在训练retinamask时,遇到了这个问题,IndexError: list index out of range。

IndexError: list index out of range on Training

试了网上的更改num_works,以及将dataloder函数中改为drop_last=True,default=false,还有将replace torch.unit8 with torch.bool in the code.一个一个方法全部试了一遍,还是没有解决,弄了整整一下午,心累。最后将pytorch版本由1.2降到1.1,编译python setup.py build之后终于可以运行了。感觉有时候版本对代码影响还挺大的,老是出一些奇怪的错误,换个版本就能运行了。。。