Closed
Description
Morvan老师,
你好!我在运行406_GAN.py时,报了如下错误:
RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation: [torch.FloatTensor [128, 1]], which is output 0 of TBackward, is at version 2; expected version 1 instead. Hint: the backtrace further above shows the operation that failed to compute its gradient. The variable in question was changed in there or anywhere later. Good luck!
能帮忙看一下是什么原因吗?谢谢
使用版本:
pytorch:1.5.0
python:3.7.4
Metadata
Assignees
Labels
No labels