e3x.nn.activations.hard_silu

e3x.nn.activations.hard_silu(x)[source]

Hard SiLU/Swish activation function.

Computes the element-wise function (see hard_sigmoid)

\[\mathrm{hard\_silu}(x) = x \cdot \mathrm{hard\_sigmoid}(x)\]
../_images/e3x.nn.activations.hard_silu_0_0.svg
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.

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.