jax.nn.relu6

Contents

jax.nn.relu6#

jax.nn.relu6(x) = <jax._src.custom_derivatives.custom_jvp object>[source]#

Rectified Linear Unit 6 activation function.

Computes the element-wise function

\[\mathrm{relu6}(x) = \min(\max(x, 0), 6)\]

except under differentiation, we take:

\[\nabla \mathrm{relu}(0) = 0\]

and

\[\nabla \mathrm{relu}(6) = 0\]
Parameters:

x (Union[Array, ndarray, bool_, number, bool, int, float, complex]) – input array

Return type:

Array

Returns:

An array.

See also

relu()