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之后程序正常运行。
阅读全文