Scaled Exponential Linear Unit (SELU)#

API#

class warp_nn.modules.activations.SELU[source]#

Bases: Module

Scaled 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

\[\begin{split}\lambda = 1.0507009873554804934193349852946 \\ \alpha = 1.6732632423543772848170429916717\end{split}\]
__call__(input: array) array[source]#

Forward pass of the activation function.

Parameters:

input – The input array, with up to 3 dimensions.

Returns:

The output array, with same shape as the input array.