Skip to content
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

run_rnn_agent.py run error #1

Open
futurepaycc opened this issue Aug 26, 2021 · 0 comments
Open

run_rnn_agent.py run error #1

futurepaycc opened this issue Aug 26, 2021 · 0 comments

Comments

@futurepaycc
Copy link

torch: 1.8.0+cu111
python: 3.7.7

log:

File "run_rnn_agent.py", line 82, in
loss.backward(retain_graph=True)
File "/home/liunix/.pyenv/versions/3.7.7/lib/python3.7/site-packages/torch/tensor.py", line 245, in backward
torch.autograd.backward(self, gradient, retain_graph, create_graph, inputs=inputs)
File "/home/liunix/.pyenv/versions/3.7.7/lib/python3.7/site-packages/torch/autograd/init.py", line 147, in backward
allow_unreachable=True, accumulate_grad=True) # allow_unreachable flag
RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation: [torch.FloatTensor [4, 16]], which is output 0 of TBackward, is at version 3; expected version 2 instead. Hint: enable anomaly detection to find the operation that failed to compute its gradient, with torch.autograd.set_detect_anomaly(True)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant