liveBook · Manning

ReLU

As explained in Math and Architectures of Deep Learning

The rectified linear activation function that outputs zero for negative inputs and the input itself for positive inputs.

ReLU, or the rectified linear unit, maps an input x to max(0, x). It outputs zero for negative inputs and preserves positive inputs, adding nonlinearity after convolutional layers. In VGG, repeated ReLU activations make stacked 3 × 3 convolutions more expressive. section 11.2.1

Its practical behavior in convolutional networks includes:

  • Negative activations become zero, while positive activations pass through unchanged. section 11.2.1
  • VGG places a ReLU after each convolution, increasing nonlinearity without changing the convolution's spatial resolution. section 11.2.1
  • ReLU is unbounded; unlike local response normalization, it does not bound large outputs. section 11.2.1

PyTorch inside a convolutional block

A VGG-style block pairs each 3 × 3 convolution with nn.ReLU(inplace=True), then applies max pooling after the block. The same activation also appears in the fully connected classifier. section 11.2.1

Equation 11.1

ReLU(x) = max(0, x)

Use the equation to verify the zero-for-negative and identity-for-positive behavior. section 11.2.1

How Math and Architectures of Deep Learning covers it

How deep it goes
Defines ReLU mathematically, gives geometric intuition, and shows PyTorch placement; it does not detail gradient behavior.
Examples
Shows ReLU in VGG convolutional blocks, classifier layers, and the PyTorch nn.ReLU implementation.
What you can do after
Apply ReLU via PyTorch when constructing VGG-style convolutional blocks and classifiers.
How it connects
Connects ReLU with convolutional layers, VGG, max pooling, local response normalization, and model expressiveness.

Also explained in

Compare how 12 books explain ReLU →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Math and Architectures of Deep Learning. The section links point to the parts of the book it draws on.