rsommerfeld / trocr

Powerful handwritten text recognition. A simple-to-use, unofficial implementation of the paper "TrOCR: Transformer-based Optical Character Recognition with Pre-trained Models".
MIT License
176 stars 27 forks source link

Model.eval() #9

Closed dparres closed 1 year ago

dparres commented 1 year ago

Hi!

During training you don’t use model.eval() when you call to validate() function. It could affect to model performance?

rsommerfeld commented 1 year ago

Hi, thanks for noticing this! I will push a new commit shortly

As a side node: The model seems to be in eval-mode by default, which means that after loading a pre-trained model and using it for inference, there should not be any impact on performance. I would expect the validation accuracies to be affected, but have not tested if the impact is actually measurable. If you did, feel free to update here as I'm curious!