Skip to content

Commit

Permalink
fix: no need for retain_graph to be True on losses
Browse files Browse the repository at this point in the history
  • Loading branch information
beniz committed Oct 18, 2022
1 parent d6c3a5d commit b715638
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion models/base_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -1025,7 +1025,7 @@ def optimize_parameters(self):
)
else:
ll = getattr(self, loss) / self.opt.train_iter_size
ll.backward(retain_graph=True)
ll.backward(retain_graph=False)

loss_names = []

Expand Down

0 comments on commit b715638

Please sign in to comment.