Calculating MSE and MAE


I would like to calculate the MSE and MAE for a PyTorch model. How do I go about doing this? Are there functions already available to do this, please? Many thanks in advance

Yes, they are already implemented in Pytorch. Use nn.MSELoss and nn.L1Loss respectively.

1 Like

Thanks a lot @mariosasko