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

issue with retain_graph=True #31

Open
Mordokkai opened this issue Sep 8, 2021 · 0 comments
Open

issue with retain_graph=True #31

Mordokkai opened this issue Sep 8, 2021 · 0 comments

Comments

@Mordokkai
Copy link

Hi,

I wrote my dataset.py and search.yaml for segmentation. The first forward pass is ok but at the first backward pass I get this error message:

File "anaconda3/envs/nn_seg/lib/python3.8/site-packages/torch/autograd/init.py", line 147, in backward
Variable._execution_engine.run_backward(
RuntimeError: Trying to backward through the graph a second time (or directly access saved variables after they have already been freed). Saved intermediate values of the graph are freed when you call .backward() or autograd.grad(). Specify retain_graph=True if you need to backward through the graph a second time or if you need to access saved variables after calling backward.

Full log in log.txt

Do you have any idea where this problem could come from ?
Bests,

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