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