MSELoss
Loss FunctionsMean Squared Error — average of squared differences between predictions and targets.
For each element, compute the squared difference, then average them all.
Python
Shift+Enter to run
1
2
3
4
5
6
7
8
9
Step 0 / 0
Speed
Write Python code and press Shift+Enter or click "Run" to visualize.
Run the operation to see step-by-step explanation.