UserWarning: indexing with dtype torch.uint8 is now deprecated, please use a dtype torch.bool instead
时间:2019-12-27 15:09:36
收藏:0
阅读:1603
在用pytorch跑模型时,总是出现一堆这个警告,影响查看模型结果。
在网上找了下解决办法,大多是遵循这篇博客改的:https://blog.csdn.net/BBZZ2/article/details/101022935
将model.py obj_mask转为int8 bool obj_mask=obj_mask.bool() # convert int8 to bool noobj_mask=noobj_mask.bool() #convert int8 to bool
我也是照这个方法做的,具体如下:

原文:https://www.cnblogs.com/zhibei/p/12106893.html
评论(0)