Soft-sign#

API#

class warp_nn.modules.activations.SoftSign[source]#

Bases: Module

Soft-sign activation function.

This class computes the element-wise soft-sign activation function:

\[\text{SoftSign}(x) = \frac{x}{1 + |x|}\]
__call__(
input: array,
) array[source]#

Forward pass of the activation function.

Parameters:

input – The input array, with up to 3 dimensions.

Returns:

The output array, with same shape as the input array.