02 2023 档案
python报错 Warning: masked_scatter_ received a mask with dtype torch.uint8, this behavior is now deprecated,please use a mask with dtype torch.bool instead.
摘要:今天跑代码的时候一直报这个错 虽然不影响结果,但是很影响调试代码。 最终发现是在求loss的时候将mask设置成了ByteTensor,而报错提示用bool类型,于是改成BoolTensor之后程序正常运行。 阅读全文
posted @ 2023-02-10 10:26 小黑哈哈 阅读(239) 评论(0) 推荐(0) 编辑




点击右上角即可分享
微信分享提示