AlexNet faced a practical obstacle: deep networks were difficult to train when sigmoid or tanh activations saturated and gradients dwindled. Its adoption of the rectified linear unit, or ReLU, helped gradients pass through many layers and made larger experiments feasible. section 2.5.2
ReLU outputs zero for a negative input and leaves a nonnegative input unchanged. For example, −2 becomes 0, while 3 remains 3. On the positive side, its constant derivative lets a gradient pass without the repeated shrinking associated with saturating activations. 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 ReLU’s flat negative side and rising positive side with the bounded curves of sigmoid and tanh. section 2.5.2
In a controlled comparison, switching from tanh to ReLU accelerated AlexNet’s convergence by a factor of six. ReLU was not a complete training recipe, however: inactive units could become stuck outputting zero. AlexNet set biases in specific layers to 1 to activate ReLU neurons at the start of training. section 2.5.2 section 2.5.4
ReLU became a default activation for deep networks and appeared, or was adapted, in later architectures including VGGNet, GoogLeNet, and ResNet. AlexNet’s result also depended on weight initialization, momentum, dropout, data augmentation, and GPU engineering. Still deeper networks continued to face vanishing gradients and model degradation. section 2.5.2 section 2.5.5











