mish¶
- paddle.nn.functional. mish ( x, name=None ) ¶
mish 激活层。计算公式如下:
\[ \begin{align}\begin{aligned}\begin{split}softplus(x) = \begin{cases} x, \text{if } x > \text{threshold} \\ \ln(1 + e^{x}), \text{otherwise} \end{cases}\end{split}\\Mish(x) = x * \tanh(softplus(x))\end{aligned}\end{align} \]
返回¶
Tensor
,数据类型和形状同x
一致。
代码示例¶
COPY-FROM: paddle.nn.functional.mish