Missing model.eval() in eval.py scripts
stachu86 opened this issue · comments
In all of the eval.py
scripts in egs
there are only calls to torch.no_grad().__enter__()
and I believe there should be also a model.eval()
call. I know that for the most cases there will be no difference, but for example in egs/whamr/TasNet/local/conf.yml
there is dropout=0.3
, so it can matter, and the more important thing is that, it can lead to new bugs and strange behavior when eval.py
is reused with new models (I had this problem).
On this line, in the function that loads the best model, .eval()
is called, so the model is in the right mode.
But you're right that it should be visible in the eval script to be more understanding and easier to review.