Max pooling downsamples a feature map by sliding a kernel over local patches and replacing each patch with its largest value. This preserves strong local responses while reducing spatial precision and can make features more robust to small location changes. section 10.7 section 10.8
For each kernel position, the output is max(patch). Output size depends on kernel size and stride: a 2 × 2 kernel with stride 2 produces an output feature map half the input height and width; a 3 × 3 kernel with stride 3 reduces each dimension to one-third. section 10.7
A 2 × 2 pooling pass
Partition a 4 × 4 feature map into 2 × 2 patches with stride 2. Max pooling emits one maximum per patch, creating a 2 × 2 feature map. In PyTorch, create torch.nn.MaxPool2d(kernel_size=2, stride=2) and apply it to an N × C × H × W input tensor. section 10.7
In VGG-style convolutional blocks, convolution and ReLU layers retain spatial resolution, then a max-pool layer halves it. Repeating this across five blocks reduces a 224 × 224 input to a 7 × 7 feature map while channel counts increase. section 11.2.1
Max pooling also supports region-based detection. RoI pooling applies max pooling to regions of different sizes on a shared convolutional feature map, yielding fixed-sized features for classifier and regressor layers. section 11.4.3
Figure 10.19 Max pooling using a 2 × 2 kernel with stride 2. The resulting output feature map is half the size of the input feature map. Each value of the output feature map is a max of the corresponding local patch in the input feature map.
This diagram traces each 2 × 2 local patch to one maximum, making the halved spatial dimensions explicit. section 10.7









