jax.nn.swish#
- jax.nn.swish(x)[source]#
SiLU (aka swish) activation function.
Computes the element-wise function:
\[\mathrm{silu}(x) = x \cdot \mathrm{sigmoid}(x) = \frac{x}{1 + e^{-x}}\]swish()
andsilu()
are both aliases for the same function.- Parameters:
x (ArrayLike) – input array
- Returns:
An array.
- Return type:
See also