Skip to main content

celu

Function celu 

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

Applies the Continuously Differentiable Exponential Linear Unit function element-wise.

$$ \text{CELU}(x) = \begin{cases} x & \text{if } x \geq 0 \newline \alpha \cdot \left(\exp\left(\frac{x}{\alpha}\right) - 1\right) & \text{otherwise} \end{cases} $$

See also CELU

§Arguments

  • alpha: scaling parameter for the negative part.