Learn Before
Example
Example of Pooling with Custom Padding and Stride
Consider a input tensor populated with values through . Applying a max-pooling layer with padding and stride yields a output tensor with elements . The padding of extends the input borders so the pooling window can be centered near the edges, and the stride of moves the window two positions per step. This demonstrates how adjusting padding and stride together controls the spatial resolution of the pooling output.
0
1
Updated 2026-05-12
Tags
D2L
Dive into Deep Learning @ D2L