3.4.4 · D4Convolutional Neural Networks

Exercises — Feature maps and receptive fields

2,711 words12 min readBack to topic

This page is your self-test workshop. Every problem below builds on Feature maps and receptive fields. We climb the ladder: L1 Recognition → L2 Application → L3 Analysis → L4 Synthesis → L5 Mastery. Each solution is hidden inside a collapsible callout — try it yourself first, then reveal.

Before we start, the two formulas we will lean on the whole way (both come straight from the parent note, no new symbols):

Keep these two boxes open in your mind. Everything is bookkeeping on top of them.


Level 1 — Recognition

Can you read a formula and plug numbers in?

Exercise 1.1

Input image is . You apply one filter, stride , padding . What is the output feature-map height?

Recall Solution

We use because the question asks for output size , and this is the only formula that turns into an output dimension.

Plug in : Answer: . With no padding, the filter cannot reach the edges, so the map shrinks from to .

Exercise 1.2

A convolutional layer has filters, each . The input is . Stride , padding . Give the full output tensor shape .

Recall Solution

Channels come from the number of filters: each filter produces one feature map ("one opinion"), so . The input's channels vanish — a filter reads all input channels at once and collapses them into a single map.

Spatial size uses the size formula with : A conv with padding preserves the spatial size.

Answer: .

Exercise 1.3

What is , and in plain words what does it mean?

Recall Solution

. It is the base case of the recursion: before any convolution, an "input pixel sees only itself" — its receptive field is a single pixel wide.


Level 2 — Application

Can you run the recursion across a real stack?

Exercise 2.1

Two stacked convolutions, both stride , no pooling. Compute the receptive field .

Recall Solution

Layer 1: . The empty product is (i.e. ), so Layer 2: cumulative stride from layer 1 is , so Answer: . Two convs "see" a patch — the classic reason VGG stacks small kernels.

Exercise 2.2

Three stacked stride- convs. Compute using the uniform-layer shortcut and confirm by recursion.

Recall Solution

Shortcut (for ): . With : Check by recursion: Answer: . For stride- stacks, receptive field grows linearly in depth.

Exercise 2.3

Conv (, stride ) → MaxPool (, stride ). Compute the receptive field after pooling and report the cumulative stride at each step.

Recall Solution

Pooling counts as a layer with kernel and stride . We track and together. Conv1 (): the cumulative stride entering it is , so Now update the jump: . Pool (): the cumulative stride entering it is still , so Now update the jump: . Answer: , with cumulative stride after the pool. The pool window covers conv outputs (adding pixel of reach) and doubles , which will amplify any later layer.

Look at the figure — the pool merges two adjacent conv-outputs, widening the input region from to pixels.

Figure — Feature maps and receptive fields

Level 3 — Analysis

Can you track the cumulative-stride multiplier and the interplay of layers?

Exercise 3.1

Full stack: Conv1 (, ) → Pool (, ) → Conv2 (, ). Compute and the final cumulative stride .

Recall Solution

Track and together. Conv1: . Update . Pool: . Update . Conv2: the cumulative stride entering Conv2 is , so each of its taps jumps input pixels: Answer: , cumulative stride . The pool's stride amplified Conv2's expansion — that's the exponential engine.

Figure — Feature maps and receptive fields

Exercise 3.2

Same as 3.1 but insert a second pool (, ) after Conv2. Compute .

Recall Solution

Continue from Ex 3.1: after Conv2, , cumulative stride . Pool2 (): the cumulative stride entering it is : Cumulative stride becomes . Answer: , cumulative stride .

Exercise 3.3

Two identical downsampling blocks stacked. Block = Conv (, ) → Pool (, ). Compute the receptive field after both blocks and note the growth pattern.

Recall Solution

Block 1:

  • Conv: , then .
  • Pool: , then .

Block 2:

  • Conv: , then .
  • Pool: , then .

Answer: after two blocks. Compare with one block (): the jump is super-linear, because each pool doubles the multiplier that the next conv rides on.


Level 4 — Synthesis

Can you combine dilation, size, and receptive-field reasoning to design?

Exercise 4.1

A dilated conv with dilation . First find its effective kernel size , then its single-layer receptive field.

Recall Solution

Dilation inserts gaps between filter taps, so As layer 1: Answer: , . A dilated sees as wide as a plain — but uses only weights, not .

Exercise 4.2

Design goal: reach a receptive field of at least using three stride- layers with dilations . Verify it works.

Recall Solution

Compute per layer, then run the recursion (cumulative stride stays since every ):

  • Layer 1 : . .
  • Layer 2 : . .
  • Layer 3 : . .

Answer: . ✓ Exponentially-growing dilation () reaches with zero downsampling, keeping full resolution — the core trick of dense-prediction networks.

Exercise 4.3

You need output spatial size equal to input () with a stride- conv. What padding achieves this?

Recall Solution

Set in the size formula. First note we can drop the floor here: with stride , the quantity is a whole number, so exactly — the floor only matters when can create fractions. So: Answer: . The "same-padding" rule for stride : . ✓


Level 5 — Mastery

Can you reason about a whole architecture and its limits?

Exercise 5.1

A network: Conv1 (, , ) → Pool (, ) → Conv2 (, , ) → Pool (, ). Input . Give (a) the final spatial size and (b) the receptive field of a final-layer neuron.

Recall Solution

(a) Spatial size, applying the size formula stage by stage:

  • Conv1: .
  • Pool1: .
  • Conv2: .
  • Pool2: . Final spatial size: .

(b) Receptive field, tracking the cumulative-stride multiplier introduced in the formula box:

  • Conv1: , then .
  • Pool1: , then .
  • Conv2: , then .
  • Pool2: , then . Receptive field: .

Answer: (a) , (b) . Each final neuron summarizes a image patch into one value on a grid.

Exercise 5.2

Push it: how many extra stride- layers (each adds with ) would you append to the network of Ex 5.1 to make the receptive field cover the entire input (i.e. )?

Recall Solution

After Ex 5.1, and cumulative stride . Each appended stride- layer adds: We need . Since is a whole number, . Check: . ✓ (With : , not enough.) Answer: extra layers.

Exercise 5.3 (Degenerate / limiting case)

A convolution, any stride, any depth. What is its receptive field, and why is that the extreme case worth knowing?

Recall Solution

For : the expansion term is at every layer. So forever. Answer: at any depth. A conv never widens the spatial view — it only mixes channels at a fixed pixel. It is the degenerate "zero-width-growth" case, and precisely why convs are used purely for channel reshaping in deeper architectures.


Related: 3.4.01-Convolutional-layers · 3.4.02-Pooling-layers · 3.4.03-Padding-and-stride · 3.3.02-Activation-functions