question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

levit_128: Trying to backward through the graph a second time...

See original GitHub issue

RuntimeError: Trying to backward through the graph a second time… (LOG)

This error may impact multiple models in this sweep, but only one repro is given below:

Repro cmd python benchmarks/dynamo/timm_models.py --accuracy --backend aot_eager --ddp --no-optimize-ddp --training --verbose --only levit_128 Log: https://gist.github.com/wconstab/1dfd032ed5cf4ff86b105aa4da6fa32c#file-timm_models_levit_128_dynamo_eager_ddp_no_optimize-log

Summary of Exception:

RuntimeError: Trying to backward through the graph a second time (or directly access saved tensors 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 tensors after calling backward.

Issue Analytics

  • State:closed
  • Created 10 months ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
anijain2305commented, Nov 22, 2022

This model must have some unusual setup. Even pytorch native does not work. It will likely take some model-specific code in the benchmarks to make it work.

Is there any reason we want levit_128 to work? I propose to skip here.

0reactions
wconstabcommented, Nov 8, 2022

ah - --nothing is the feature i was wishing for. i was about to write my own version of it. thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

RuntimeError: Trying to backward through the graph a second ...
I keep running into this error: RuntimeError: Trying to backward through the graph a second time, but the buffers have already been freed....
Read more >
Pytorch - RuntimeError: Trying to backward through the graph ...
backward() is trying to back-propagate all the way through to the start of time, which works for the first batch but not for...
Read more >
RuntimeError: Trying to backward through the graph ... - GitHub
RuntimeError : Trying to backward through the graph a second time, but the saved intermediate results have already been freed. Specify retain_graph=True when ......
Read more >
Trying to backward through the graph a second time, but the ...
I keep running into this error: RuntimeError: Trying to backward through the graph a second time, but the buffers have already been freed....
Read more >
Trying to backward through the graph a second time, but the ...
Hello Guys, error Traceback (most recent call last): File "", line 1, in runfile('C:/Users/SRIKANTH R/.spyder-py3/pyro_bayesian_ternary.py', ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found