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.
- Parameters:
x (
Union[Float[Array, '... 1 (max_degree+1)**2 num_features'], Float[Array, '... 2 (max_degree+1)**2 num_features']]) – Input features to which the nonlinearity is applied.fast (
bool, default:True) – Whether to use a faster formulation with higher memory cost.
- Return type:
- Returns:
The result of applying the nonlinearity to the input features.