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
In multi-class classification exercise(spiral dataset)
When I run the training loop,it says:
RuntimeError: Trying to backward through the graph a second time
I have not used train_loss.backward() anywhere else in the notebook.
I tried specifying retain_graph=True as an argument to the backward pass but it is not resolving the error.
I tried changing the LR & random_seed but it is of no help.
I think,all the data is of the correct dtype with requires_grad=True and on the same device as model so please suggest something new.
notebook link:https://colab.research.google.com/drive/1FWk5PTsN5KSl9HSFWu_OkGZ9eUSZgqhf#scrollTo=LyJ7SnsDNaU7&uniqifier=1
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
In multi-class classification exercise(spiral dataset)
When I run the training loop,it says:
RuntimeError: Trying to backward through the graph a second time
I have not used train_loss.backward() anywhere else in the notebook.
I tried specifying retain_graph=True as an argument to the backward pass but it is not resolving the error.
I tried changing the LR & random_seed but it is of no help.
I think,all the data is of the correct dtype with requires_grad=True and on the same device as model so please suggest something new.
notebook link:https://colab.research.google.com/drive/1FWk5PTsN5KSl9HSFWu_OkGZ9eUSZgqhf#scrollTo=LyJ7SnsDNaU7&uniqifier=1
Beta Was this translation helpful? Give feedback.
All reactions