Mish¶
- class paddle.nn. Mish ( 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} \]
形状¶
input:任意形状的 Tensor。
output:和 input 具有相同形状的 Tensor。
代码示例¶
COPY-FROM: paddle.nn.Mish