mlx_rs::nnFunction elu
Source pub fn elu(x: impl AsRef<Array>, alpha: impl Into<Option<f32>>) -> Result<Array>
Expand description
Applies the Exponential Linear Unit.
This is:
ⓘwhich(x.gt(0), x, alpha * (exp(x) - 1))
§Params
x
: The input array
alpha
: Default to 1.0 if not provided