e3x.nn.activations.relu

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

Rectified linear unit activation function.

Computes the gated linear activation with:

\[\mathrm{gate}(x) = \max(\mathrm{sgn}\ x, 0)\]

For scalar inputs, this is equivalent to:

\[\mathrm{relu}(x) = \max(x, 0)\]
../_images/e3x.nn.activations.relu_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.