flax.linen.activation.hard_silu

Contents

flax.linen.activation.hard_silu#

flax.linen.activation.hard_silu(x)[source]#

Hard SiLU (swish) activation function

Computes the element-wise function

\[\mathrm{hard\_silu}(x) = x \cdot \mathrm{hard\_sigmoid}(x)\]

Both hard_silu() and hard_swish() are aliases for the same function.

Parameters

x – input array

Returns

An array.

See also

hard_sigmoid()