Max pooling
Max pooling is an aggregation operation that replaces each local or grouped region with its maximum value, often to downsample a representation.
Math and Architectures of Deep Learning
- How it is used
- Downsamples convolutional feature maps while retaining strong local activations and improving robustness to small feature shifts.
- How deep it goes
- Defines local maximum aggregation and relates kernel size and stride to output resolution, with a PyTorch implementation.
- Examples
- Uses 2 × 2 stride-2 pooling on a 4 × 4 tensor and max-pool layers at the ends of VGG blocks.
- What you can do after
- Apply it via PyTorch MaxPool2d to downsample feature maps and place spatial reductions in convolutional architectures.
Read how Math and Architectures of Deep Learning explains max pooling →
Deep Learning with R, Third Edition
A max-pooling layer down-samples local regions by retaining their maximum values.
- How it is used
- Downsamples convolutional feature maps so image classifiers can build broader spatial features without retaining large maps throughout.
- How deep it goes
- Defines the channel-wise window maximum, contrasts it with convolution, and examines the consequences of omitting pooling.
- Examples
- Shows alternating pooling layers in MNIST and dogs-versus-cats classifiers, plus a model that omits them.
- What you can do after
- Apply it via R keras3 to downsample feature maps between convolution layers and inspect the resulting shapes.
Read how Deep Learning with R, Third Edition explains max pooling →
Deep Learning with Python, Third Edition
A two-dimensional pooling layer that downsamples feature maps by taking local maxima.
- How it is used
- Downsamples feature maps between convolution layers in image-classification ConvNets.
- How deep it goes
- Defines channel-wise local maxima and typical window and stride settings, then explains architectural tradeoffs without a mathematical derivation.
- Examples
- Uses MNIST layer shapes, a no-pooling comparison, and a larger dogs-versus-cats ConvNet.
- What you can do after
- Apply it via Keras MaxPooling2D between convolution layers and inspect how feature-map dimensions change.
Read how Deep Learning with Python, Third Edition explains max pooling →
Deep Learning with PyTorch, Second Edition
- How it is used
- Downsamples convolutional feature maps while retaining their strongest local responses for later layers.
- How deep it goes
- Explains 2 × 2 maximum selection, checks resulting tensor shapes, and places pooling in 2D and 3D convolution blocks.
- Examples
- Demonstrates a 32 × 32 RGB image reduced to 16 × 16, a two-pool image classifier, and a 3D convolution block.
- What you can do after
- Apply it via PyTorch `nn.MaxPool2d(2)` to halve spatial dimensions between convolutional layers.
Read how Deep Learning with PyTorch, Second Edition explains max pooling →
Build a Text-to-Image Generator (from Scratch)
Max pooling is a spatial downsampling operation that retains the maximum activation within each local window.
- How it is used
- Uses local maxima to downsample feature maps in CNNs, U-Net contracting paths, and image architectures such as ResNet50.
- How deep it goes
- Explains windows, kernel size, stride, numerical output, and PyTorch usage, but does not develop pooling internals.
- Examples
- Demonstrates a 4 × 4 tensor, 2 × 2 windows, stride 2, and the output tensor [[2, 4], [5, 7]].
- What you can do after
- Apply it via PyTorch's nn.MaxPool2d(2) and verify its output on image tensors.
Read how Build a Text-to-Image Generator (from Scratch) explains max pooling →
Graph Neural Networks in Action
max_pool is a PyTorch Geometric pooling function that coarsens a graph by pooling clustered nodes using maximum-valued features.
- How it is used
- Coarsens clustered graphs to reduce their size for analysis and processing.
- How deep it goes
- Shows the two-step clustering-and-pooling procedure and a PyG call, without detailing pooling internals.
- Examples
- Uses a Karate Club graph with before-and-after sizes and a road-network trial that loses important detail.
- What you can do after
- Apply it via PyTorch Geometric's `graclus()` and `max_pool()` to coarsen a graph and assess information loss.
Read how Graph Neural Networks in Action explains max pooling →
Natural Language Processing in Action, Second Edition
Max pooling is a downsampling operation that retains the largest activation within each local region of a feature map.
- How it is used
- Compresses convolution responses into a strong pattern-presence signal for CNN-based text recognition.
- How deep it goes
- Explains maximum selection, tensor compression, and mean-pooling contrast, but does not detail 2D window or stride configuration.
- Examples
- Uses ordered word-pattern detection, a moving-stencil analogy, and wave-and-sandcastle imagery to illustrate strongest-response selection.
- What you can do after
- Evaluate/understand how CNNs convert many filter responses into a compact signal for detecting patterns.
Read how Natural Language Processing in Action, Second Edition explains max pooling →
Evolutionary Deep Learning: Genetic algorithms and neural networks
Max pooling is a neural-network operation that downsamples local activation regions by retaining their maximum values.
- How it is used
- Reduces noisy convolutional feature maps before flattening or passing representations through subsequent neural-network layers.
- How deep it goes
- Explains the reduction purpose and Keras placement, then stops short of deriving pooling mathematically or examining its learned behavior.
- Examples
- Uses Fashion-MNIST CNN layers, model summaries, a max-pooling figure, and automatically generated autoencoder gene sequences.
- What you can do after
- Operate/configure Keras MaxPooling2D layers and inspect their effect on convolutional model dimensions.
Read how Evolutionary Deep Learning: Genetic algorithms and neural networks explains max pooling →
Machine Learning Algorithms in Depth
Max pooling is a downsampling operation that retains the largest value within each local window of a feature sequence.
- How it is used
- Downsamples convolutional feature maps while retaining maximum incoming values in image and sequence models.
- How deep it goes
- Defines maximum aggregation and its architectural role, but does not derive window geometry or pooling gradients.
- Examples
- Uses LeNet for MNIST image classification and a multi-input Quora question-similarity model with 1D convolutions.
- What you can do after
- Apply max pooling via Keras/TensorFlow within image and sequence convolutional architectures.
Read how Machine Learning Algorithms in Depth explains max pooling →
Sutskever's List
A downsampling operation that retains the largest activation within each local spatial window.
- How it is used
- Uses max pooling in AlexNet to reduce feature-map dimensions while retaining strong local activations.
- How deep it goes
- Defines local maximum selection and explains its computational and positional-robustness effects, without detailing pooling variants.
- Examples
- Uses AlexNet’s 3 × 3 windows, stride 2, and progressively reduced spatial dimensions as concrete examples.
- What you can do after
- Understand how max pooling preserves strong local activations while reducing spatial dimensions and computation.
Related concepts
- downsamplingkind of · Downsampling is the reduction of data quantity, spatial resolution, temporal resolution, or sampling rate by retaining, selecting, or aggregating fewer representative values or observations.
- poolingkind of · Pooling is an operation that aggregates values or representations across regions or axes to produce a reduced or summarized representation.
- convolutional neural networkpart of · A convolutional neural network is a neural-network architecture that applies learned convolutional operations to extract patterns from structured data.
- strided convolutioncontrasts with · A strided convolution is a convolution whose filter moves across input positions by more than one step, typically reducing spatial or temporal resolution.
- convolutional layeruses · A convolutional layer is a neural-network layer that applies shared learned filters to local regions of structured input to produce feature representations.
- neural network layerkind of · A neural network layer is a computational stage or component that transforms input representations into outputs within a neural network.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.









