Multiple layer model
A multi-layer perceptron (MLP) is a feedforward net with multiple layers. A second linear layer, named hidden layer, is added to the previous example:
Having two linear layers following each other is equivalent to having a single linear layer.
With a non-linear function or non-linearity or transfer function between the linearities, the model does not simplify into a linear one any more, and represents more possible functions in order to capture more complex patterns in the data:
Activation functions helps saturating (ON-OFF) and reproduces the biological neuron activations.
The Rectified Linear Unit (ReLU) graph is given as follows:
(x + T.abs_(x)) / 2.0
The Leaky Rectifier Linear Unit (Leaky ReLU) graph is given as follows:
( (1 + leak) * x + (1 – leak) * T.abs_(x) ) / 2.0
Here, leak
is a parameter that defines the slope in the negative values. In leaky rectifiers, this parameter is fixed.
The activation named PReLU considers the leak
parameter to be learned.
More generally...