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
When trying to train a network with OTTT, the function runs into an error, seemingly because the neuron state is not detached from the computational graph after each time-step. Adding functional.detach_net(model) inside functional.ottt_online_training eliminated the error for me.
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.
The text was updated successfully, but these errors were encountered:
Issue type
SpikingJelly version
0.0.0.0.15
Description
When trying to train a network with OTTT, the function runs into an error, seemingly because the neuron state is not detached from the computational graph after each time-step. Adding
functional.detach_net(model)
insidefunctional.ottt_online_training
eliminated the error for me.Code to reproduce the error
Error
The text was updated successfully, but these errors were encountered: