asteroid-team / asteroid

The PyTorch-based audio source separation toolkit for researchers

Home Page:https://asteroid-team.github.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.