elu

Function elu 

pub fn elu<const D: usize, B>(tensor: Tensor<B, D>, alpha: f64) -> Tensor<B, D>
where B: Backend,
Expand description

Applies the Exponential Linear Unit function element-wise.

f(x) =

  • x for x > 0
  • alpha * (exp(x) - 1) for x <= 0