Open xielock opened 3 years ago
遇到一样的问题,请问你解决了吗 one of the variables needed for gradient computation has been modified by an inplace operation: [torch.FloatTensor [3, 1]], which is output 0 of SliceBackward, is at version 2; expected version 0 instead. Hint: enable anomaly detection to find the operation that failed to compute its gradient, with torch.autograd.set_detect_anomaly(True). @xielock
遇到一样的问题,请问你解决了吗 one of the variables needed for gradient computation has been modified by an inplace operation: [torch.FloatTensor [3, 1]], which is output 0 of SliceBackward, is at version 2; expected version 0 instead. Hint: enable anomaly detection to find the operation that failed to compute its gradient, with torch.autograd.set_detect_anomaly(True). @xielock
no,我放弃了
我用的pytorch1.7.1版本;
首先跑的时候遇到了第一个问题: 我这个部分添加了.cpu()解决了,后面遇见了第二个问题对于这个问题,我修改了一下相应的数据类型解决了
最后还报另一个错误?请问该如何修改,谢谢!!!!