Skip to content
Discussion options

You must be logged in to vote

That's because you are modifying batch in-place, so the computation graph is never freed. Note that although you detach() the batch object, the old features are still kept in memory for backpropagation. This resolves the issue:

mdl.forward(copy.copy(batch))

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@fjulian
Comment options

@rusty1s
Comment options

@fjulian
Comment options

@rusty1s
Comment options

@fjulian
Comment options

Answer selected by fjulian
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants