Calculating Receptive Fields in Sequential Layers
What you'll learn: How to mathematically determine how much of the input image each neuron "sees" as convolutions stack up in deeper layers.
The Core Idea
As you stack convolutional layers, each neuron in a deeper layer "sees" a progressively larger region of the original input image. This happens because each layer's receptive field builds on the previous layer's. The receptive field grows based on kernel size and stride at each layer.
The Formula
For sequential layers, the receptive field grows additively with each layer. Here's the mathematical relationship:
Receptive Field Formula:
RF_new = RF_previous + (kernel_size - 1) × cumulative_stride
Where:
- RF_previous: receptive field size from the layer below
- cumulative_stride: product of all strides up to this layer
Example Walkthrough
Input layer: RF = 1 (each pixel sees itself)
Layer 1: 3×3 kernel, stride 1
- RF = 1 + (3-1)×1 = 3 pixels
Layer 2: 3×3 kernel, stride 1
- RF = 3 + (3-1)×1 = 5 pixels
Layer 3: 3×3 kernel, stride 2
- RF = 5 + (3-1)×2 = 9 pixels
The Analogy
Think of it like looking through telescopes stacked together. Each telescope magnifies what the previous one sees. A 3×3 kernel is like a small telescope, and stride determines how much you "jump" when sliding—larger strides expand your view faster.
Key Takeaway: The receptive field size grows with each layer based on kernel size and the accumulated effect of all previous strides—each neuron in deeper layers integrates information from increasingly larger input regions.