mindspore.nn.Mish

class mindspore.nn.Mish[源代码]

逐元素计算输入Tensor的MISH(Self Regularized Non-Monotonic Neural Activation Function 自正则化非单调神经激活函数)。

更多参考详见 mindspore.ops.mish()

支持平台:

Ascend GPU CPU

样例:

>>> x = Tensor(np.array([[-1.0, 4.0, -8.0], [2.0, -5.0, 9.0]]), mindspore.float32)
>>> mish = nn.Mish()
>>> output = mish(x)
>>> print(output)
[[-0.3034014  3.9974129 -0.00026832]
 [ 1.9439590  -0.0033576 9.0000000]]