L2 loss in PyTorch

Is there an implementation in PyTorch for L2 loss? could only find L1Loss.

1 Like

Hi,

L2 loss is called mean square error, you can find it here.

2 Likes

That’s why it felt so familiar :slight_smile:
Thanks!

1 Like

from albanD link, going to this link saves some mouse clicks and looking around:

https://pytorch.org/docs/master/generated/torch.nn.MSELoss.html#mseloss

MSELOSS
CLASStorch.nn.MSELoss(size_average=None, reduce=None, reduction: str = 'mean')