softplus

Contents

softplus#

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

Softplus activation function.

Computes the element-wise function:

\[\mathrm{softplus}(x) = \log(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