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.nn.ReLU.rst 822 B

1234567891011121314151617181920212223242526
  1. mindspore.nn.ReLU
  2. =================
  3. .. py:class:: mindspore.nn.ReLU
  4. 修正线性单元激活函数(Rectified Linear Unit activation function)。
  5. 逐元素求 :math:`\max(x,\ 0)` 。特别说明,负数输出值会被修改为0,正数输出不受影响。
  6. .. math::
  7. \text{ReLU}(x) = (x)^+ = \max(0, x),
  8. ReLU相关图参见 `ReLU <https://en.wikipedia.org/wiki/Activation_function#/media/File:Activation_rectified_linear.svg>`_ 。
  9. **输入:**
  10. - **x** (Tensor) - 用于计算ReLU的任意维度的Tensor。数据类型为 `number <https://www.mindspore.cn/docs/api/zh-CN/master/api_python/mindspore.html#mindspore.dtype>`_。
  11. **输出:**
  12. Tensor,数据类型和shape与 `x` 相同。
  13. **异常:**
  14. - **TypeError** - `x` 的数据类型不是number。