e3x.nn.activations.serf

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

Serf activation function.

Computes the gated linear activation with:

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

For scalar inputs, this is equivalent to:

\[\mathrm{serf}(x) = x \cdot \mathrm{erf}(\mathrm{softplus}(x))\]

For more information, see SERF: Towards better training of deep neural networks using log-Softplus Error activation Function.

../_images/e3x.nn.activations.serf_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.