hard_sigmoid

Contents

hard_sigmoid#

class brainstate.nn.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 (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

relu6

ReLU6 activation function.

sigmoid

Standard sigmoid function.