OCGAN-Pytorch icon indicating copy to clipboard operation
OCGAN-Pytorch copied to clipboard

RuntimeError

Open BoYangXDU opened this issue 3 years ago • 1 comments

Traceback (most recent call last): File "D:\Anaconda3\envs\miao\lib\site-packages\IPython\core\interactiveshell.py", line 3441, in run_code exec(code_obj, self.user_global_ns, self.user_ns) File "", line 1, in loss_ae_all.backward() File "D:\Anaconda3\envs\miao\lib\site-packages\torch\tensor.py", line 185, in backward torch.autograd.backward(self, gradient, retain_graph, create_graph) File "D:\Anaconda3\envs\miao\lib\site-packages\torch\autograd_init_.py", line 127, in backward allow_unreachable=True) # allow_unreachable flag

RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation: [torch.cuda.FloatTensor [16, 1]], which is output 0 of TBackward, is at version 2; expected version 1 instead. Hint: enable anomaly detection to find the operation that failed to compute its gradient, with torch.autograd.set_detect_anomaly(True).

BoYangXDU avatar Dec 14 '21 07:12 BoYangXDU

Have you found out how to fix this?

XenonLamb avatar Feb 22 '22 16:02 XenonLamb