Metric computation not needed in loss_batch during training

If I am understanding correctly in L25:, metrics are being computed for each batch even during training which is called in L71:

However, we need metrics only during validation and not training.

No, the call to loss_batch during the training dl doesn’t include metrics (second line you quoted), so it defaults to None which means the line in loss_batch isn’t executed.

1 Like

Ah my bad, didn’t note that it was None

1 Like