Discrepancy between train_loss printed out by `fit` and calculated by `validate`

The first number in the output of validate is the loss while the second number is the metrics, here the accuracy.

The loss given by validate when run on the validation data loader is the same as the one in the output of fit, as it should be.

However, could anyone explain why the loss calculated on the training data loader is not the same as the one seen in the output of fit? If in the implementation the training loss is calculated differently, what is the reason for such difference?

1 Like