Concept

Overriding Padding and Stride in Pooling Layers

Although deep learning frameworks assign default stride and padding values for pooling layers, both can be manually overridden to control the output dimensions. For instance, configuring a 3imes33 imes 3 max-pooling layer with a padding of 11 and a stride of 22 on a 4imes44 imes 4 input produces a 2imes22 imes 2 output. Padding adds extra border elements (typically zeros) to the input before pooling, allowing the pooling window to cover boundary regions. Setting the stride smaller than the window size introduces overlap between adjacent windows, whereas a larger stride increases the downsampling factor. These controls mirror the padding and stride mechanisms available in convolutional layers and are essential for achieving a desired output shape in network architectures.

0

1

Updated 2026-05-12

Contributors are:

Who are from:

Tags

D2L

Dive into Deep Learning @ D2L