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.ReLU6.rst 573 B

1234567891011121314151617181920212223
  1. mindspore.nn.ReLU6
  2. ===================
  3. .. py:class:: mindspore.nn.ReLU6
  4. ReLU6激活函数。
  5. ReLU6类似于ReLU,不同之处在于设置了上限,其上限为6,如果输入大于6,输出会被限制为6。公式如下:
  6. .. math::
  7. Y = \min(\max(0, x), 6).
  8. **输入:**
  9. - **x** (Tensor) - ReLU6的输入,任意维度的Tensor,其数据类型为float16或float32。
  10. **输出:**
  11. Tensor,数据类型与 `x` 相同。
  12. **异常:**
  13. - **TypeError** - `x` 的数据类型既不是float16也不是float32。