flax.linen.activation.hard_sigmoid

Contents

flax.linen.activation.hard_sigmoid#

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

Hard Sigmoid activation function.

Computes the element-wise function

\[\mathrm{hard\_sigmoid}(x) = \frac{\mathrm{relu6}(x + 3)}{6}\]
Parameters

x – input array

Returns

An array.

See also

relu6()