mlx.nn.ELU#

class ELU(alpha=1.0)#
Applies the Exponential Linear Unit.

Simply mx.where(x > 0, x, alpha * (mx.exp(x) - 1)).

See elu() for the functional equivalent.

Parameters:

alpha – the \(\alpha\) value for the ELU formulation. Default: 1.0

Methods