In a convolutional layer, what does the stride parameter actually control?
Select an answer to reveal the explanation.
Short Explanation and Infographic
Think of the filter as a little window sliding across your image, snapping a picture at each stop. Stride is just how many pixels it jumps between snapshots. Stride of 1 means it moves one pixel at a time, nice and thorough, giving you a bigger output map. Stride of 2 means it skips a pixel each hop, so you cover the image faster but get a smaller, coarser output. The other answers are tempting but wrong: filter count is about depth, padding is about the border, and kernel size is about how big the window itself is. Stride is purely about the step size of the slide.
Full explanation below image
Full Explanation
Stride defines the step size, in pixels, that a convolutional filter moves as it slides across the height and width of the input tensor. A stride of 1 moves the filter one pixel at a time, producing maximum overlap between receptive fields and a larger output feature map. A stride of 2 or more skips pixels between applications, which downsamples the spatial dimensions of the output and reduces computational cost, at the expense of some spatial resolution. Stride is one of the key hyperparameters, along with kernel size and padding, used in the standard formula for computing output feature-map dimensions: output = floor((input - kernel + 2*padding) / stride) + 1.
The distractor about the number of filters is wrong because that value determines the depth (number of channels) of the output volume, not how the filter moves spatially; it is set independently of stride. The padding distractor is incorrect because padding refers to adding rows and columns of (usually zero) values around the input border to control output size and preserve edge information — a completely separate hyperparameter from stride, even though both affect output dimensions. The kernel-size distractor is wrong because the filter's height and width are fixed by the kernel size parameter, describing the footprint of the receptive field, not how far it travels between applications.
A useful memory aid: kernel size answers "how big is the window," padding answers "how is the border handled," and stride answers "how far does the window jump." Larger strides are often used in early layers of efficient architectures to reduce spatial resolution quickly without a separate pooling operation, trading some detail for speed and a smaller memory footprint.