Skip to content

Commit

Permalink
with no_grad at evaluate
Browse files Browse the repository at this point in the history
  • Loading branch information
Hiroshiba committed Apr 25, 2020
1 parent fbaa3ef commit 442058b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pytorch_trainer/training/extensions/evaluator.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,8 @@ def __call__(self, trainer=None):
target.named_children())

with reporter:
result = self.evaluate()
with torch.no_grad():
result = self.evaluate()

reporter_module.report(result)
return result
Expand Down

0 comments on commit 442058b

Please sign in to comment.