ng-video-lecture icon indicating copy to clipboard operation
ng-video-lecture copied to clipboard

Call `model.eval()` before generating?

Open gustavdelius opened this issue 1 year ago • 1 comments

I understand why we have to call model.eval() before calculating the average loss in estimate_loss(). But should we not similarly call model.eval() before we start generating from the model?

gustavdelius avatar Apr 23 '23 21:04 gustavdelius

You should be calling model.eval() at the time of inference, that is, if you want to set the affect of weights post normalization and dropout. Without setting model.eval() there is no effect of dropout and normalization at the time of testing. I believe that is just something that was forgotten.

manudwd avatar May 14 '23 16:05 manudwd