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
I am using a 2080 super GPU and after the training loop I end up with this error
Variable._execution_engine.run_backward( # Calls into the C++ engine to run the backward pass
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.
Fair enough, If I follow the error and introduce .backward(retain_graph = True),
CUDA just demands for enormous memory like
CUDA out of memory. Tried to allocate 133.05 GiB (GPU 0; 7.79 GiB total capacity; 444.44 MiB already allocated; 5.24 GiB free; 612.00 MiB reserved in total by PyTorch)(Edited)
Could you share any possible fix ?
The text was updated successfully, but these errors were encountered:
I am using a 2080 super GPU and after the training loop I end up with this error
Variable._execution_engine.run_backward( # Calls into the C++ engine to run the backward pass 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.
Fair enough, If I follow the error and introduce .backward(retain_graph = True),
CUDA just demands for enormous memory like
CUDA out of memory. Tried to allocate 133.05 GiB (GPU 0; 7.79 GiB total capacity; 444.44 MiB already allocated; 5.24 GiB free; 612.00 MiB reserved in total by PyTorch)(Edited)
Could you share any possible fix ?
Hello, I also encountered this problem, may I ask you to solve it?
I am using a 2080 super GPU and after the training loop I end up with this error
Variable._execution_engine.run_backward( # Calls into the C++ engine to run the backward pass
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.
Fair enough, If I follow the error and introduce .backward(retain_graph = True),
CUDA just demands for enormous memory like
CUDA out of memory. Tried to allocate 133.05 GiB (GPU 0; 7.79 GiB total capacity; 444.44 MiB already allocated; 5.24 GiB free; 612.00 MiB reserved in total by PyTorch)(Edited)
Could you share any possible fix ?
The text was updated successfully, but these errors were encountered: