Require gradient false in eval mode
hwanheelee1993 opened this issue · comments
Hwanhee (Henry) Lee commented
In your code, you did not wrap the eval part with "torch.no_grad()", which means that your code computes gradient for validation data. That leads to unnecessary computation... You'd better edit that part.
(Henry) Hung Le commented
Thanks! I updated the code and will close this