brainunit.math.celu#
- brainunit.math.celu(x, alpha=1.0, unit_to_scale=None)#
Continuously-differentiable exponential linear unit activation.
Computes the element-wise function:
\[\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:
- Returns:
out – An array with the same shape as x.
- Return type:
Array
Examples
>>> import jax.numpy as jnp >>> import saiunit.math as sumath >>> sumath.celu(jnp.array([-2., 0., 2.])) Array([-0.86466473, 0. , 2. ], dtype=float32)