CELU

Contents

CELU#

class brainstate.nn.CELU(alpha=1.0)#

Applies the element-wise function.

\[\text{CELU}(x) = \max(0,x) + \min(0, \alpha * (\exp(x/\alpha) - 1))\]

More details can be found in the paper Continuously Differentiable Exponential Linear Units .

Parameters:
  • alpha (float) – The \(\alpha\) value for the CELU formulation. Default: 1.0

  • Shape

  • -----

  • Input (-)

  • Output (-)

References

Examples

>>> import brainstate.nn as nn
>>> import brainstate
>>> m = nn.CELU()
>>> x = brainstate.random.randn(2)
>>> output = m(x)