diff --git a/models/base_model.py b/models/base_model.py index bb69a46fe..6a4e93da9 100644 --- a/models/base_model.py +++ b/models/base_model.py @@ -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 = []