← Neural NetworksToolsInVisionLearning Center
Convolutional Neural Networks · Lesson 48

Stride and Feature Map Size

Learn how filter movement controls spatial detail, computation, and output dimensions.

Watch the lesson

Stride and Feature Map Size explained visually

2:09

Compare stride one and stride two on a seven-by-seven input.

Lesson overview

What you will learn

Follow filters, pooling, flattening, and classification through complete CNN examples.

  1. STRIDE ONE
  2. DENSE SAMPLING
  3. STRIDE TWO
  4. SMALLER OUTPUT
01

STRIDE ONE

Stride specifies how far a filter moves between neighboring convolution positions.

02

DENSE SAMPLING

Stride one samples densely and preserves more spatial detail.

03

STRIDE TWO

Stride two performs fewer calculations and produces a smaller feature map.

04

SMALLER OUTPUT

Filter size, stride, and padding jointly determine the output dimensions.

Knowledge check

Quick check: test your understanding

What does stride control?

How far the filter moves between positions.

Which preserves more detail, stride one or stride two?

Stride one.

What is the output for a seven-by-seven input, three-by-three filter, stride two, and no padding?

Three by three.

Accessible referenceLesson 48 transcript297 words · Matches the published narration and captionsOpen transcript

Stride controls how far a filter moves between convolution positions. A stride of one moves the filter one pixel at a time. A stride of two moves it two pixels at a time, skipping some intermediate positions. Stride affects both computational cost and the size of the resulting feature map.

Consider a seven-by-seven input and a three-by-three filter with no padding. With a stride of one, the filter can occupy five positions across and five positions down. The output feature map is five by five. With a stride of two, the filter moves farther after each calculation.

It occupies three positions across and three positions down, producing a three-by-three feature map. For a square input without padding, the output size can be calculated using: Input size minus filter size, divided by stride, plus one. For our example: Seven minus three equals four.

Four divided by two equals two. Two plus one equals three. The output is therefore three by three. When the division does not produce a whole number, implementations normally use the valid positions that fit the filter completely inside the input. A larger stride reduces the output dimensions and requires fewer convolution calculations.

This can improve efficiency. However, a large stride also discards spatial detail because the filter examines fewer positions. A smaller stride preserves more information but creates larger feature maps and requires more computation. Padding can change this relationship by adding values around the input boundary.

We will examine padding separately in a future lesson. Stride therefore represents a design choice. The network must balance spatial detail, computation, and the size of later feature maps. The important idea is simple. Stride determines how far the filter moves. That movement directly controls how densely the input is examined and how large the output becomes.