-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation #21
Comments
D:\Anaconda\envs\pt21\Lib\site-packages\torch\autograd_init_.py:251: UserWarning: Error detected in ConvolutionBackward0. Traceback of forward call that caused the error: |
@kriscpu I find the matter is self.D_optimizer.step() modifies the weights, but D_fake is used in GLoss computation later. |
it's quite useful! |
single GPU is useful, nn.DataParallel is error: |
Getting below error under pytorch version >1.4 . but it's good at pytorch 1.4.
RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation: [torch.FloatTensor [1, 512, 4, 4]] 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!
tried to found and solve all inplace operation I can locate, but CANNOT get around still. Any ideas?
The text was updated successfully, but these errors were encountered: