e3x.nn.activations.bent_identity

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

Bent identity activation function.

Computes the gated linear activation with:

\[\mathrm{gate}(x) = \frac{\sqrt{x^2 + 1}-1}{2x} + 1\]

For scalar inputs, this is equivalent to:

\[\mathrm{bent\_identity}(x) = \frac{\sqrt{x^2 + 1}-1}{2} + x\]
../_images/e3x.nn.activations.bent_identity_0_1.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.