Add MAE and L2 loss to docs (#12754)
Summary:
Fixes #12751
Pull Request resolved: https://github.com/pytorch/pytorch/pull/12754
Differential Revision: D10427661
Pulled By: ezyang
fbshipit-source-id: 75bbef85976e253ab5a7140fc57f7a0ad34d96f5
diff --git a/torch/nn/modules/loss.py b/torch/nn/modules/loss.py
index 80501f0..de248b6 100644
--- a/torch/nn/modules/loss.py
+++ b/torch/nn/modules/loss.py
@@ -24,8 +24,8 @@
class L1Loss(_Loss):
- r"""Creates a criterion that measures the mean absolute value of the
- element-wise difference between input `x` and target `y`:
+ r"""Creates a criterion that measures the mean absolute error (MAE) between each element in
+ the input `x` and target `y`.
The loss can be described as:
@@ -361,8 +361,8 @@
class MSELoss(_Loss):
- r"""Creates a criterion that measures the mean squared error between
- `n` elements in the input `x` and target `y`.
+ r"""Creates a criterion that measures the mean squared error (squared L2 norm) between
+ each element in the input `x` and target `y`.
The loss can be described as: