MSELoss()Signature: MSELoss(reduction = 'mean')
reduction determines how the list of individual losses should be combined into a single loss value
'mean': (default) mean of the the list of losses'sum': sum of the list of losses'none': No reduction applied. Referred to as "unreduced" loss.loss = nn.MSELoss()
input = torch.randn(3, 5, requires_grad=True)
target = torch.randn(3, 5)
output = loss(input, target)
output.backward()