Scaled Exponential Linear Unit (SELU)#
API#
- class warp_nn.modules.activations.SELU(
- *,
- scale: float = 1.0507009873554805,
- alpha: float = 1.6732632423543772,
- requires_grad: bool = True,
Bases:
ModuleScaled Exponential Linear Unit (SELU) activation function.
This class computes the element-wise SELU activation function:
\[\begin{split}\text{SELU}(x) = \begin{cases} \lambda \, x, & \text{ if } x \geq 0\\ \lambda \, \alpha \, (e^x - 1), & \text{ if } x < 0 \end{cases}\end{split}\]where \(\lambda\) and \(\alpha\) default to \(1.0507009873554804934193349852946\) and \(1.6732632423543772848170429916717\) respectively.
- Parameters:
scale – The scale (\(\lambda\)) value for the SELU function.
alpha – The alpha (\(\alpha\)) value for the SELU function.
requires_grad – Whether the cached output arrays of the module require gradients.