The activation function is a non-linear function, which ensures that the neuron can not strictly pass linear transformations of the inputted examples through the network, which would otherwise make it impossible to learn non-linear functions.
While the activation function for the hidden layers is a design choice, the ones for the output layer are defined by the learning task: - If the NN is to perform regression then the activation function (or none at all) should allow the output space to be . - If the NN is to perform classification then we are typically interested in an output that represents the probability of an example belonging to a class, meaning that we want the mapping : - for binary classification, a sigmoid function is used. - for multi-class classification, the soft-max function is used.
Examples
- Logistic sigmoid
- Softmax for classes
- Rectified linear unit (ReLU) where is the activation value calculated by the neuron using and .