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.Sigmoid.rst 720 B

4 years ago
4 years ago
4 years ago
4 years ago
123456789101112131415161718192021222324252627282930
  1. mindspore.nn.Sigmoid
  2. =============================
  3. .. py:class:: mindspore.nn.Sigmoid
  4. Sigmoid激活函数。
  5. 按元素计算Sigmoid激活函数。
  6. Sigmoid函数定义为:
  7. .. math::
  8. \text{sigmoid}(x_i) = \frac{1}{1 + \exp(-x_i)},
  9. 其中 :math:`x_i` 是输入的元素。
  10. 关于Sigmoid的图例见 `Sigmoid <https://en.wikipedia.org/wiki/Sigmoid_function#/media/File:Logistic-curve.svg>`_ 。
  11. **输入:**
  12. - **x** (Tensor) - 数据类型为float16或float32的Sgmoid输入。任意维度的Tensor。
  13. **输出:**
  14. Tensor,数据类型和shape与 `x` 的相同。
  15. **异常:**
  16. **TypeError** - `x` 的数据类型既不是float16也不是float32。