Learner fit and train loss

Does learn.fit() does it keep track of the train loss computed in training mode or eval mode? Right now my val loss is significantly lower than my train loss, and I’m not sure how to detect if my model is overfitting or not.

Hi, Andrew

The val_loss can be lower than the train_loss because of the following reasons:

  • train_loss is the average over minibatches and the model is updated during this training process. When the valid?loss is computed the model is fixed (at the end of epoch).
  • There is dropout layers which worsen the train_loss

Overfitting can be detected by monitoring the increase in valid_loss or increase in the metric you use.