Mish
- 类torch.nn.Mish(inplace=False)[源代码]
-
逐元素应用Mish函数。
Mish:一种自正则化的非单调神经激活函数。
$\text{Mish}(x) = x * \text{Tanh}(\text{Softplus}(x))$注意
- 形状:
-
-
输入: $(*)$,其中$*$表示任意维度的数量。
-
输出: $(*)$,形状与输入相同。
-
示例:
>>> m = nn.Mish() >>> input = torch.randn(2) >>> output = m(input)