e3x.nn.activations.celu
- e3x.nn.activations.celu(x, alpha=1.0)[source]
Continuously-differentiable exponential linear unit activation.
Computes the gated linear activation with:
\[\begin{split}\mathrm{gate}(x) = \begin{cases} 1, & x > 0\\ \frac{\alpha}{x} \left(\exp(\frac{x}{\alpha}) - 1\right), & x \le 0 \end{cases}\end{split}\]For scalar inputs, this is equivalent to:
\[\begin{split}\mathrm{celu}(x) = \begin{cases} x, & x > 0\\ \alpha \left(\exp(\frac{x}{\alpha}) - 1\right), & x \le 0 \end{cases}\end{split}\]For more information, see Continuously Differentiable Exponential Linear Units.
- Parameters:
x (
Union[Float[Array, '... 1 (max_degree+1)**2 num_features'], Float[Array, '... 2 (max_degree+1)**2 num_features']]) – Input features to which the nonlinearity is applied.alpha (
Union[Float[Array, ''], float], default:1.0) – The \(\alpha\) value (see definition of \(\mathrm{celu}\)).
- Return type:
- Returns:
The result of applying the nonlinearity to the input features.