In the context of configuring a Convolutional Neural Network (CNN), what does the "stride" parameter define?
Select an answer to reveal the explanation.
Short Explanation and Infographic
Here's the deal: when a convolutional filter is doing its job, it doesn't just sit in one place. It slides across the input image from left to right, and top to bottom. The stride is simply how many pixels the filter jumps each time it moves. Think of it like taking steps. A stride of 1 means you take baby steps, moving the filter one pixel at a time. A stride of 2 means you take bigger steps, jumping two pixels at a time. The bigger the stride, the faster you get across the image, and the smaller your output feature map will be. Option B is the correct choice here!
Full explanation below image
Full Explanation
In Convolutional Neural Networks (CNNs), the stride is a key hyperparameter for both convolutional and pooling layers. It determines how many pixels the filter/kernel shifts after completing a multiplication step. For instance, if the stride is set to 1, the filter moves one pixel at a time, producing highly overlapping feature extractions and a larger output map. If the stride is set to 2, the filter shifts by two pixels, which skips intermediate positions, downsamples the output spatial size by approximately half, and reduces computational complexity.
Let's check the other options: - Option A describes the kernel size (or filter size), which dictates the receptive field of the filter (e.g., 3x3 or 5x5 pixels), not how it moves. - Option C is determined by the number of filters applied in that layer, which dictates the number of output channels (or depth) of the feature map. - Option D describes padding, which is the practice of adding extra pixels (typically zeros) around the border of the input image to control output shape and preserve edge information.
For the exam, make sure you remember that stride is the parameter controlling the step size of the filter's movement across the input.