kmkurn / pytorch-crf

(Linear-chain) Conditional random field in PyTorch.
https://pytorch-crf.readthedocs.io
MIT License
935 stars 151 forks source link

Do I need to call loss_func.eval() before the validation loops? #114

Closed JohnHerry closed 12 months ago

JohnHerry commented 1 year ago

There is trainable paramters in this module, Then Do I need to call ".eval()" before each validating and ".train()" afterwards?

kmkurn commented 12 months ago

Yes that's correct.