You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

mindspore.ops.ReLU.rst 753 B

4 years ago
123456789101112131415161718192021222324252627
  1. mindspore.ops.ReLU
  2. ===================
  3. .. py:class:: mindspore.ops.ReLU
  4. 线性修正单元激活函数(Rectified Linear Unit)。
  5. 返回 :math:`\max(x,\ 0)` 的值,负值神经元将被设置为0, 正值神经元将保持不变。
  6. .. math::
  7. ReLU(x) = (x)^+ = max(0, x)
  8. .. note::
  9. 一般来说,与 `ReLUV2` 相比,此算子更常用。且 `ReLUV2` 会多输出一个掩码。
  10. **输入:**
  11. - **input_x** (Tensor) - ReLU的输入,任意维度的Tensor。其数据类型为数值型。
  12. **输出:**
  13. Tensor,数据类型和shape与 `input_x` 相同。
  14. **异常:**
  15. - **TypeError** - `input_x` 的数据类型不是数值型。
  16. - **TypeError** - `input_x` 不是Tensor。