sigmoid

Contents

sigmoid#

class brainstate.nn.sigmoid(x)[source]#

Sigmoid activation function.

Computes the element-wise function:

\[\mathrm{sigmoid}(x) = \frac{1}{1 + e^{-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

log_sigmoid

Logarithm of the sigmoid function.