hard_silu#
- class brainstate.nn.hard_silu(x)[source]#
Hard SiLU (Swish) activation function.
Computes the element-wise function:
\[\mathrm{hard\_silu}(x) = x \cdot \mathrm{hard\_sigmoid}(x)\]- Parameters:
x (
Array|ndarray|bool|number|bool|int|float|complex|Quantity) – Input array.- Returns:
An array with the same shape as the input.
- Return type:
Array|Quantity
See also
hard_sigmoidHard sigmoid activation function.
siluStandard SiLU activation function.
hard_swishAlias for hard_silu.
Notes
Both hard_silu and hard_swish are aliases for the same function.