Activation function
The non-linear function applied by each neuron, such as ReLU, sigmoid or tanh.
Without activations, stacking layers would still give a linear model. Common choices:
- ReLU : cheap, does not saturate for positive inputs; the default for hidden layers.
- Sigmoid : squashes to (0, 1); used for binary outputs.
- tanh: squashes to (−1, 1); common in recurrent networks.
Sigmoid and tanh saturate for large inputs, so their gradients vanish in deep networks, one reason ReLU took over.