This page hunts down every case the formulas from the parent note can throw at you. We start by listing the scenario classes in a table, then work one example per cell — so once you finish, no exam setup can surprise you.
Two formulas do all the heavy lifting here. Let us re-state them in plain words so we never use a symbol before it is anchored.
Definition The two workhorses (every symbol named)
Output size — how big a feature map comes out:
O = ⌊ s I + 2 p − k ⌋ + 1
I = input side length (in pixels), the width or height we feed in.
p = padding : how many rows/columns of zeros we glue onto each side.
k = kernel size : the side length of the little square window that slides.
s = stride : how many pixels we jump each step.
⌊ ⋅ ⌋ = the floor : round down to the nearest whole number (you cannot place half a window).
Receptive field — how much of the original image one deep pixel "sees":
R l = R l − 1 + ( k l − 1 ) ⋅ ∏ i = 1 l − 1 s i , R 0 = 1
R l = width (in original-image pixels) that a neuron in layer l depends on.
∏ i = 1 l − 1 s i = cumulative stride : multiply together the strides of all earlier layers. This converts "pixels in layer l − 1 " into "pixels in the original image".
Intuition Why floor and not just divide?
The window can only land on whole-pixel positions. If the arithmetic gives 6.7 steps, you physically fit 6 full steps — the leftover 0.7 of a step has no room to place the whole window, so it is dropped . The floor is the mathematical name for "throw away the leftover".
Every problem in this topic is one of these cells. The last column names the worked example that covers it.
#
Case class
What makes it tricky
Covered by
A
Padding "same" (p tuned to preserve size)
must reverse-solve for p
Example 1
B
Stride > 1 , divides evenly
floor does nothing
Example 2
C
Stride > 1 , does not divide → floor bites
leftover pixels dropped
Example 3
D
Degenerate: 1 × 1 kernel
k = 1 , receptive field frozen
Example 4
E
Zero padding + big kernel → shrinking
output smaller than input
Example 5
F
Multi-layer receptive field with pooling
cumulative stride amplifies
Example 6
G
Dilated (spaced) kernels
effective kernel grows
Example 7
H
Real-world word problem (object detector)
translate words → numbers
Example 8
I
Exam twist: "what input gives output 1?"
limiting/edge behaviour
Example 9
Worked example Example 1 — Cell A: "same" padding, solve for
p
Statement : Input I = 28 . We want a 5 × 5 kernel (k = 5 ), stride s = 1 , to output the same size, O = 28 . What padding p do we need?
Forecast : guess p before reading. (Hint: a 5 × 5 eats 2 pixels off each edge.)
Write the equation with the target baked in. Set O = I :
28 = ⌊ 1 28 + 2 p − 5 ⌋ + 1
Why this step? We know the answer we want (28 ); the unknown is p , so we treat the formula as an equation to solve, not to evaluate.
Drop the floor (stride 1 means the inside is already a whole number):
28 = 28 + 2 p − 5 + 1 ⇒ 28 = 24 + 2 p
Why? With s = 1 , dividing by 1 changes nothing, so ⌊ x ⌋ = x .
Solve : 2 p = 4 ⇒ p = 2 .
Why? Simple algebra isolates p .
Verify : plug back — ⌊( 28 + 4 − 5 ) /1 ⌋ + 1 = ⌊ 27 ⌋ + 1 = 28 . ✓ The rule of thumb "p = ( k − 1 ) /2 " gives ( 5 − 1 ) /2 = 2 , matching.
Worked example Example 2 — Cell B: stride divides evenly
Statement : I = 32 , k = 4 , s = 2 , p = 1 . Find O .
Forecast : stride 2 roughly halves it — guess near 16.
Numerator first : I + 2 p − k = 32 + 2 − 4 = 30 .
Why this step? This is the last valid starting position (in un-strided steps) before the window runs off the padded edge.
Divide by stride : 30/2 = 15 . This is a whole number.
Why? The stride tells us we only land every 2nd position; 30 is even, so nothing is left over.
Add 1 for the fencepost: O = 15 + 1 = 16 .
Why? Positions 0 , 2 , 4 , … , 30 number 16 landings — you count the fenceposts, not the gaps.
Verify : ⌊ 30/2 ⌋ + 1 = 15 + 1 = 16 . Even numerator ⇒ floor did nothing, exactly as the cell promised. ✓
Worked example Example 3 — Cell C: floor actually bites
Statement : I = 32 , k = 4 , s = 3 , p = 0 . Find O , and identify the dropped pixels.
Forecast : 32/3 ≈ 10.6 — will it round to 10 or 11?
Numerator : 32 + 0 − 4 = 28 .
Why this step? No padding, so the window's top-left may sit anywhere from 0 up to 28 .
Divide : 28/3 = 9.33 … — not whole.
Why? Stride 3 lands at 0 , 3 , 6 , … ; the last one that fits is 27 (since 28 is not a multiple of 3, position 28 would need a step of only... it just isn't a landing).
Floor then +1 : ⌊ 9.33 ⌋ + 1 = 9 + 1 = 10 .
Why? Landings are 0 , 3 , 6 , 9 , 12 , 15 , 18 , 21 , 24 , 27 — that is 10 of them. Input columns 30 , 31 are never covered fully and are silently dropped.
Verify : last landing 27 , window covers cols 27 , 28 , 29 , 30 — wait, 27 + 4 − 1 = 30 , so col 30 is covered but col 31 is not. The floor threw away the position that would have needed col 31 , 32 , 33 . O = 10 . ✓
Worked example Example 4 — Cell D: degenerate
1 × 1 kernel
Statement : I = 50 , k = 1 , s = 1 , p = 0 . Find O and the receptive field of a single layer.
Forecast : a 1 × 1 window touches one pixel — does anything change?
Size : ⌊( 50 + 0 − 1 ) /1 ⌋ + 1 = 49 + 1 = 50 .
Why this step? A 1 × 1 window fits at every one of the 50 columns.
Receptive field : R 1 = R 0 + ( k − 1 ) ⋅ 1 = 1 + ( 1 − 1 ) = 1 .
Why? ( k − 1 ) = 0 , so the window adds zero extra reach. The neuron still sees exactly one input pixel.
Verify : 1 × 1 convolutions mix channels , never spatial neighbours — consistent with R 1 = 1 . Output size unchanged: 50 . ✓ (This is the limiting case where receptive field stops growing.)
Worked example Example 5 — Cell E: no padding, big kernel, shrink
Statement : I = 12 , k = 7 , s = 1 , p = 0 . Find O .
Forecast : a fat 7 × 7 with no padding chops the edges — expect noticeably smaller.
Numerator : 12 + 0 − 7 = 5 .
Why this step? The wide window loses k − 1 = 6 pixels of reach (3 off each side conceptually), so the valid starting positions shrink.
Divide & +1 : ⌊ 5/1 ⌋ + 1 = 6 .
Why? Positions 0 , 1 , 2 , 3 , 4 , 5 = six landings.
Verify : shrink amount = I − O = 12 − 6 = 6 = k − 1 . Matches the general rule "unpadded conv shrinks by k − 1 ". ✓
Worked example Example 6 — Cell F: receptive field through conv → pool → conv
Statement : Conv1 (k = 3 , s = 1 ) → MaxPool (k = 2 , s = 2 ) → Conv2 (k = 3 , s = 1 ). Find R 3 .
Forecast : single layers give 3; pooling amplifies — guess bigger than 7.
Conv1 : R 1 = R 0 + ( 3 − 1 ) ⋅ 1 = 1 + 2 = 3 . Cumulative stride = 1 .
Why this step? First layer sees a 3 × 3 patch directly.
MaxPool (k p = 2 , s p = 2 ): R 2 = R 1 + ( 2 − 1 ) ⋅ stride so far 1 = 3 + 1 = 4 . Cumulative stride now 1 ⋅ 2 = 2 .
Why? The pool window straddles 2 conv1 outputs; those overlap, adding just 1 new input pixel. Pooling counts as a layer.
Conv2 : R 3 = R 2 + ( 3 − 1 ) ⋅ cumulative stride 2 = 4 + 4 = 8 .
Why? Each post-pool pixel now stands for a 2-pixel jump in the input, so Conv2's reach is doubled .
Verify : matches the parent note's Example 2 result R 3 = 8 . The stride-2 pool is what turned a would-be "+2" into "+4". ✓
Worked example Example 7 — Cell G: dilated kernels
Statement : three 3 × 3 layers, stride 1, dilation rates 1 , 2 , 4 . Find R 3 .
Forecast : dilation spaces the taps out — expect much bigger than the undilated 7.
Effective kernel for dilation d : k eff = k + ( k − 1 ) ( d − 1 ) .
Why this step? Dilation d inserts d − 1 gaps between the k taps, so the window reaches wider without new weights.
Layer 1 (d = 1 ): k eff = 3 , R 1 = 1 + ( 3 − 1 ) ⋅ 1 = 3 .
Layer 2 (d = 2 ): k eff = 3 + 2 ⋅ 1 = 5 , R 2 = 3 + ( 5 − 1 ) ⋅ 1 = 7 .
Layer 3 (d = 4 ): k eff = 3 + 2 ⋅ 3 = 9 , R 3 = 7 + ( 9 − 1 ) ⋅ 1 = 15 .
Why? Same recursion, but each k replaced by its k eff .
Verify : matches parent Example 3: R 3 = 15 , more than double the undilated 7 , with zero extra parameters. ✓
Worked example Example 8 — Cell H: real-world word problem
Statement : You build a small object detector . Input photo 224 × 224 . Stem: Conv (k = 7 , s = 2 , p = 3 ) then MaxPool (k = 3 , s = 2 , p = 1 ). (a) What spatial size reaches the next block? (b) What input region does one post-pool pixel see?
Forecast : two stride-2 stages ≈ divide by 4 → guess ~56.
Conv output : ⌊( 224 + 6 − 7 ) /2 ⌋ + 1 = ⌊ 223/2 ⌋ + 1 = 111 + 1 = 112 .
Why this step? 2 p = 6 , minus k = 7 gives 223 ; stride 2 halves it (floor drops the odd leftover).
Pool output : ⌊( 112 + 2 − 3 ) /2 ⌋ + 1 = ⌊ 111/2 ⌋ + 1 = 55 + 1 = 56 .
Why? Feed the 112 into the same formula with the pool's own k , s , p .
Receptive field : Conv R 1 = 1 + ( 7 − 1 ) ⋅ 1 = 7 , cumulative stride 2 . Pool R 2 = 7 + ( 3 − 1 ) ⋅ 2 = 7 + 4 = 11 .
Why? The pool's reach ( k p − 1 ) = 2 is scaled by the conv's stride 2 .
Verify : (a) 56 × 56 — the classic "÷4" of a ResNet stem. (b) one detection pixel already sees an 11 × 11 input patch. Units: all pixels. ✓
Worked example Example 9 — Cell I: exam twist, limiting case "
O = 1 "
Statement : A k = 3 , s = 1 , p = 0 conv is stacked repeatedly with no padding. Starting from I = 9 , how many layers until the feature map collapses to O = 1 (a single "global" pixel)?
Forecast : each unpadded 3 × 3 shrinks by 2 — count the steps.
Per-layer shrink : with s = 1 , p = 0 , O = I − ( k − 1 ) = I − 2 .
Why this step? From Example 5's rule, an unpadded conv removes k − 1 pixels.
Iterate : 9 → 7 → 5 → 3 → 1 . That is 4 layers.
Why? Subtract 2 each layer; count until we hit 1.
Cross-check with receptive field : after 4 layers R 4 = 1 + 4 ⋅ ( 3 − 1 ) = 1 + 8 = 9 .
Why? When the map is a single pixel, its receptive field must equal the whole input 9 — a beautiful consistency check.
Verify : R 4 = 9 = I . The final lone pixel sees the entire input, which is exactly what "output size 1" means. ✓
Recall Quick self-test
Output size with I = 10 , k = 3 , s = 2 , p = 0 ? ::: ⌊( 10 − 3 ) /2 ⌋ + 1 = ⌊ 3.5 ⌋ + 1 = 4 .
Why does a 1 × 1 kernel leave the receptive field unchanged? ::: Because ( k − 1 ) = 0 , adding zero reach.
After conv(k = 3 , s = 1 )→pool(k = 2 , s = 2 )→conv(k = 3 , s = 1 ), what is R 3 ? ::: 8 .
In a dilated stack d = 1 , 2 , 4 of 3 × 3 convs, R 3 = ? ::: 15 .
Mnemonic "Floor eats the leftover, stride multiplies the reach."
Two sentences hold this whole topic: for size , floor throws away the pixels that don't fit; for receptive field , the cumulative stride multiplies each new layer's reach.
See also: 3.4.01-Convolutional-layers · 3.4.02-Pooling-layers · 3.4.03-Padding-and-stride · 3.4.05-CNN-architectures · 3.3.02-Activation-functions