1mindspore.mint.nn.functional.sigmoid 2===================================== 3 4.. py:function:: mindspore.mint.nn.functional.sigmoid(input) 5 6 逐元素计算Sigmoid激活函数。Sigmoid函数定义为: 7 8 .. math:: 9 10 \text{sigmoid}(x_i) = \frac{1}{1 + \exp(-x_i)} 11 12 其中 :math:`x_i` 是x的一个元素。 13 14 Sigmoid函数图: 15 16 .. image:: ../images/Sigmoid.png 17 :align: center 18 19 参数: 20 - **input** (Tensor) - `input` 即为上述公式中的 :math:`x`。任意维度的Tensor,数据类型为float16、float32、float64、complex64或complex128。 21 22 返回: 23 Tensor,数据类型和shape与 `input` 的相同。 24 25 异常: 26 - **TypeError** - `input` 的数据类型不是float16、float32、float64、complex64或complex128。 27 - **TypeError** - `input` 不是Tensor。