Course contentsShow
← Machine Learning and Deep Learning
Lesson 870 of 3,53820. Convolutional Neural Networks: FundamentalsFree lesson

Pooling Hyperparameters: Kernel Size and Stride

Master pooling window size and stride settings, understanding their impact on output spatial dimensions and overlap.

Pooling Hyperparameters: Kernel Size and Stride

What You'll Learn

You'll learn how to control pooling behavior by adjusting kernel size and stride, and how these settings determine output dimensions and feature overlap.

The Core Idea

When applying pooling operations (max or average), you have two key hyperparameters to configure:

Kernel size defines the dimensions of the pooling window—how large an area you're summarizing into a single value. Common choices are 2×2 or 3×3.

Stride controls how far the pooling window moves between operations. A stride of 2 means the window jumps 2 pixels at a time.

Think of it like viewing a landscape through a camera viewfinder: kernel size is how much you see through the lens, and stride is how many steps you take before taking the next photo.

How They Impact Your Network

Output spatial dimensions shrink based on these parameters. With a 2×2 kernel and stride of 2, your output is roughly half the input size in each dimension. The formula mirrors convolution output calculation:

output_size = (input_size - kernel_size) / stride + 1

Overlap behavior depends on whether stride is smaller than kernel size. When stride < kernel size, pooling windows overlap, potentially preserving more spatial information. When stride = kernel_size (most common), windows don't overlap—each input region contributes to exactly one output value.

For example, applying 2×2 pooling with stride 2 to a 28×28 feature map produces a 14×14 output. Using 3×3 pooling with stride 2 on the same input gives 13×13.

Design Choices

Most architectures use 2×2 kernels with stride 2 for clean, non-overlapping downsampling that halves dimensions. Larger kernels (3×3) may be used for more aggressive downsampling or when you want the pooling operation to consider larger neighborhoods.

Key Takeaway: Pooling kernel size sets the neighborhood summary region, while stride controls movement step size—together they determine output spatial dimensions and whether pooling windows overlap.