An activation function transforms a neuron's weighted input before it passes the result onward. In AlexNet, ReLU followed each convolutional layer, helping the network train at greater depth. section 2.5.1 section 2.5.2
Activation functions differ in how they transform inputs:
- ReLU maps negative inputs to zero and leaves positive inputs unchanged, supporting stronger gradient flow through deep networks. section 2.5.2
- Sigmoid and tanh compress outputs into limited ranges; saturation can contribute to vanishing gradients. section 2.5.2
ReLU versus tanh in AlexNet
In a controlled comparison, replacing tanh with ReLU accelerated convergence sixfold. That efficiency allowed experiments with larger networks, helping establish ReLU as a default for deep networks. section 2.5.2
Figure 2.4 Plot of ReLU (top), sigmoid (middle), and tanh (bottom) activation functions generated in R by the author. Activation functions map input values (on the x-axis) to output values (on the y-axis). For example, ReLU produces 0 for negative inputs; for positive inputs, the output equals the input (0 for x < 0 and linear for x ≥ 0). The sigmoid function maps inputs to values between 0 and 1, resembling an S-curve. Similarly, the tanh function provides a smooth S-shaped curve but maps inputs to values between –1 and 1, centered at 0.
Compare the input-output curves for ReLU, sigmoid, and tanh. section 2.5.2













