liveBook · Manning

ReLU

As explained in Machine Learning Algorithms in Depth

ReLU is the rectified-linear-unit activation function that outputs the greater of zero and its input.

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
figure

The LeNet architecture shows where ReLU sits between convolution and max pooling. section 10.2.1

How Machine Learning Algorithms in Depth covers it

How deep it goes
Defines ReLU and places it in layer compositions and a CNN architecture; does not develop its derivative.
Examples
Uses a multilayer perceptron and a LeNet-style MNIST digit classifier with repeated convolution–ReLU–pooling stages.
What it assumes
Assumes familiarity with weighted sums and layers while introducing why activation functions are needed.
What you can do after
Apply it via Keras/TensorFlow as the activation between convolution and max-pooling operations in an MNIST classifier.
How it connects
Connects ReLU to affine layers, multilayer perceptrons, convolutional layers, max pooling, and backpropagation.

Also explained in

Compare how 12 books explain ReLU →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Machine Learning Algorithms in Depth. The section links point to the parts of the book it draws on.