Continuously differentiable Exponential Linear Unit (CELU)#
API#
- class warp_nn.modules.activations.CELU(*, alpha: float = 1.0, requires_grad: bool = True)[source]#
Bases:
ModuleContinuously differentiable Exponential Linear Unit (CELU) activation function.
This class computes the element-wise CELU activation function:
\[\text{CELU}(x) = \max(0, x) + \min\left(0, \alpha \, (e^{x / \alpha} - 1)\right)\]- Parameters:
alpha – The alpha value for the CELU function. It must be non-zero.
requires_grad – Whether the cached output arrays of the module require gradients.
- Raises:
ValueError – If
alphais zero.