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):
self.model.eval()
else:
self.model.train()
self.optimizer.zero_grad()
if sample is not None:
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