Skip to content

RuntimeError: Trying to backward through the graph a second time #8549

Discussion options

You must be logged in to vote

Hi @Keiku This error happens if you try to call backward on something twice in a row without calling optimizer.step. Are you able to share your LightningModule code? It looks like the code in your repo just uses vanilla pytorch.

Thanks 😃

Replies: 1 comment 12 replies

Comment options

You must be logged in to vote
12 replies
@Keiku
Comment options

@Keiku
Comment options

@tchaton
Comment options

@ethanwharris
Comment options

@Keiku
Comment options

Answer selected by Keiku
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants