Pytorch 报错:
one of the variables needed for gradient computation has been modified by an inplace operation: [torch.FloatTensor [1,1024,1, 1]] is at version 2; expected version 1 instead. Hint: enable anomaly detection to find the operation that failed to compute its gradient,withtorch.autograd.set_dect_anomaly(True)
我使用的系统是:Ubuntu 的 linux系统
我试着把程序里面的x+=1这类都改成x=x+1,但是没有用。而且程序里也没有出现inplace=true这样的语句。
请问大家这个问题应该怎么解决啊?
该项目来源于:https://github.com/leftthomas/SRGAN
pytorch报错:one of the variables needed for gradient computation has been modified by an inplace opera
最新推荐文章于 2024-04-10 16:51:05 发布