ott.neural.networks.velocity_field.VelocityField.act_fn

ott.neural.networks.velocity_field.VelocityField.act_fn#

VelocityField.act_fn()#

SiLU (aka swish) activation function.

Computes the element-wise function:

\[\mathrm{silu}(x) = x \cdot \mathrm{sigmoid}(x) = \frac{x}{1 + e^{-x}}\]

swish() and silu() are both aliases for the same function.

Parameters:

x (Union[Array, ndarray, bool_, number, bool, int, float, complex]) – input array

Return type:

Array

Returns:

An array.

See also

sigmoid()