mindspore2022/docs/api/api_python/nn/mindspore.nn.RMSELoss.rst

20 lines
792 B
ReStructuredText
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

mindspore.nn.RMSELoss
======================
.. py:class:: mindspore.nn.RMSELoss
RMSELoss用来测量 :math:`x`:math:`y` 元素之间的均方根误差,其中 :math:`x` 是输入Tensor :math:`y` 是目标值。
假设 :math:`x`:math:`y` 为一维Tensor长度为 :math:`N` :math:`x`:math:`y` 的loss为
.. math::
loss = \sqrt{\frac{1}{N}\sum_{i=1}^{N}{(x_i-y_i)^2}}
**输入:**
- **logits** (Tensor) - 输入的预测值任意维度的Tensor。
- **labels** (Tensor) - 输入的目标值任意维度的Tensor。一般与 `logits` 的shape相同。如果 `logits``labels` 的shape不同需支持广播。
**输出:**
Tensor输出值为加权损失值其数据类型为float其shape为()。