You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hoping someone can clear up the error below.
Tryting to run MGKN_general_darcy2d.py and encounter the following error during Training (see below).
Seems like a variable is being overwritten (in_place?) somewhere . . . can't figure out exactly where.
Tried variations of adding variable.clone() in the NN forward feed process to see if it helps, but nothing so far.
preprocessing finished, time used: 257.48266062999755
3 [0, 400, 500, 525]
Traceback (most recent call last):
File "MGKN_general_darcy2d.py", line 280, in
l2.backward()
File "/home//projects/dir_env/env_pytorch/lib/python3.8/site-packages/torch/_tensor.py", line 396, in backward
torch.autograd.backward(self, gradient, retain_graph, create_graph, inputs=inputs)
File "/home//projects/dir_env/env_pytorch/lib/python3.8/site-packages/torch/autograd/init.py", line 173, in backward
Variable._execution_engine.run_backward( # Calls into the C++ engine to run the backward pass
RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation: [torch.cuda.FloatTensor [525, 64]], which is output 0 of ReluBackward0, is at version 1; 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).
adding torch.autograd.set_detect_anomaly(True) produces the following message:
RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation: [torch.cuda.FloatTensor [525, 64]], which is output 0 of ReluBackward0, is at version 1; expected version 0 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!
The text was updated successfully, but these errors were encountered:
Hoping someone can clear up the error below.
Tryting to run MGKN_general_darcy2d.py and encounter the following error during Training (see below).
Seems like a variable is being overwritten (in_place?) somewhere . . . can't figure out exactly where.
Tried variations of adding variable.clone() in the NN forward feed process to see if it helps, but nothing so far.
preprocessing finished, time used: 257.48266062999755
3 [0, 400, 500, 525]
Traceback (most recent call last):
File "MGKN_general_darcy2d.py", line 280, in
l2.backward()
File "/home//projects/dir_env/env_pytorch/lib/python3.8/site-packages/torch/_tensor.py", line 396, in backward
torch.autograd.backward(self, gradient, retain_graph, create_graph, inputs=inputs)
File "/home//projects/dir_env/env_pytorch/lib/python3.8/site-packages/torch/autograd/init.py", line 173, in backward
Variable._execution_engine.run_backward( # Calls into the C++ engine to run the backward pass
RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation: [torch.cuda.FloatTensor [525, 64]], which is output 0 of ReluBackward0, is at version 1; 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).
adding torch.autograd.set_detect_anomaly(True) produces the following message:
RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation: [torch.cuda.FloatTensor [525, 64]], which is output 0 of ReluBackward0, is at version 1; expected version 0 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!
The text was updated successfully, but these errors were encountered: