Why mean square error give large validation loss?

I just completed assignment2 that is insurance linear regression. while doing it first I use mean square error as a loss function but it always gave me nan as the output. However, I went through other people notebook in which they used l1_loss function. So after using that my loss significantly decrease. I cant figure it out that what was the problem with mse and if its possible then kindly explain that how to figure out which loss function should be used in different situations for training better models.
Any help would be appreciable.

1 Like