e3x.nn.activations.mish

e3x.nn.activations.mish(x, fast=True)[source]

Mish activation function.

Computes the gated linear activation with:

\[\mathrm{gate}(x) = \mathrm{tanh}(\mathrm{softplus}(x))\]

For scalar inputs, this is equivalent to:

\[\mathrm{mish}(x) = x \cdot \mathrm{tanh}(\mathrm{softplus}(x))\]

For more information, see Mish: A Self Regularized Non-Monotonic Activation Function.

../_images/e3x.nn.activations.mish_0_0.svg
Parameters:
Return type:

Union[Float[Array, '... 1 (max_degree+1)**2 num_features'], Float[Array, '... 2 (max_degree+1)**2 num_features']]

Returns:

The result of applying the nonlinearity to the input features.