A stack of affine layers alone is limited in expressive power. ReLU (rectified linear unit) adds a nonlinearity after a layer’s weighted sum: ReLU(z) = max(0, z). It outputs zero for negative inputs and leaves positive inputs unchanged. section 10.1
For a hidden layer, compute z = Wx + b, then pass ReLU(z) to the next layer. In a multilayer perceptron, the final activation instead depends on the task: softmax for classification or identity for regression. section 10.1
ReLU in digit classification
A LeNet-style MNIST classifier repeats convolution → ReLU → max pooling. Pooling reduces feature-map dimensions while later convolutional layers use more filters; the resulting features feed a dense layer and softmax classifier. section 10.2.1
Figure 10.4 LeNet architecture for MNIST digits classification
The LeNet architecture shows where ReLU sits between convolution and max pooling. section 10.2.1











