Return the mean squared error between pred and target: the average of (pred_i - target_i)^2 over all elements.
pred
target
(pred_i - target_i)^2
Input
pred = tensor([1., 2., 3.]) target = tensor([1.5000, 2.5000, 2.0000])
Output
tensor(0.5000)
This one's part of Premium. Unlock the full PyTorch track plus every other premium problem on the site.
solve(...)