"...git@developer.sourcefind.cn:renzhc/diffusers_dcu.git" did not exist on "c96bfa5c80eca798d555a79a491043c311d0f608"
Unverified Commit 202e0bbe authored by Myle Ott's avatar Myle Ott Committed by GitHub
Browse files

Fix bug when training with FP32 and --update-freq (#236)

parent 9143dfab
...@@ -198,7 +198,6 @@ class Trainer(object): ...@@ -198,7 +198,6 @@ class Trainer(object):
self.model.eval() self.model.eval()
else: else:
self.model.train() self.model.train()
self.optimizer.zero_grad()
if sample is not None: if sample is not None:
with torch.no_grad() if eval else contextlib.ExitStack(): with torch.no_grad() if eval else contextlib.ExitStack():
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment