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.HSigmoid.rst 575 B

4 years ago
4 years ago
12345678910111213141516171819202122232425
  1. mindspore.nn.HSigmoid
  2. =============================
  3. .. py:class:: mindspore.nn.HSigmoid
  4. Hard Sigmoid激活函数,按元素计算输出。
  5. Hard Sigmoid定义为:
  6. .. math::
  7. \text{hsigmoid}(x_{i}) = max(0, min(1, \frac{x_{i} + 3}{6})),
  8. 其中,:math:`x_i` 是输入Tensor的一个元素。
  9. **输入:**
  10. - **input_x** (Tensor) - Hard Sigmoid的输入,任意维度的Tensor。
  11. **输出:**
  12. Tensor,数据类型和shape与 `input_x` 的相同。
  13. **异常:**
  14. **TypeError** - `input_x` 不是tensor。