hard_silu

Contents

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_sigmoid

Hard sigmoid activation function.

silu

Standard SiLU activation function.

hard_swish

Alias for hard_silu.

Notes

Both hard_silu and hard_swish are aliases for the same function.