ott.neural.models.MLP.act_fn

Contents

ott.neural.models.MLP.act_fn#

MLP.act_fn(negative_slope=0.01)#

Leaky rectified linear unit activation function.

Computes the element-wise function:

\[\begin{split}\mathrm{leaky\_relu}(x) = \begin{cases} x, & x \ge 0\\ \alpha x, & x < 0 \end{cases}\end{split}\]

where \(\alpha\) = negative_slope.

Parameters:
Return type:

Array

Returns:

An array.

See also

relu()