elu

Contents

elu#

class brainstate.nn.elu(x, alpha=1.0)[source]#

Exponential Linear Unit activation function.

Computes the element-wise function:

\[\begin{split}\mathrm{elu}(x) = \begin{cases} x, & x > 0\\ \alpha \left(\exp(x) - 1\right), & x \le 0 \end{cases}\end{split}\]
Parameters:
  • x (Array | ndarray | bool | number | bool | int | float | complex | Quantity) – Input array.

  • alpha (Array | ndarray | bool | number | bool | int | float | complex | Quantity) – Scalar or array of alpha values. Default is 1.0.

Returns:

An array with the same shape as the input.

Return type:

Array | Quantity

See also

selu

Scaled ELU activation function.

celu

Continuously-differentiable ELU activation function.