Class: fun

fun

The activation functions a neuron can have.

They can be used in the arguments of neural network's constructor.

Source:

Members

IDENTITY

Identity is a linear function where the output is equal to the input.

x => x
Source:

LEAKY_RE_LU

LeakyReLU gives a small proportion of x if x is negative and x otherwise.

x => (x < 0.0) ? 0.01 * x : x
Source:

SIGMOID

Sigmoid takes any value as input and outputs values in the range of 0.0 to 1.0.

x => 1.0 / (1.0 + Math.exp(-x))
Source:

TANH

Tanh is similar to sigmoid, but outputs values in the range of -1.0 and 1.0.

x => Math.tanh(x)
Source: