3.4.7 · D3Convolutional Neural Networks

Worked examples — VGG networks

2,128 words10 min readBack to topic

This page takes the formulas from the VGG parent note and forces them through every kind of input they can meet: normal cases, the smallest-possible ("degenerate") cases, the zero-padding edge, huge limiting cases, a word problem, and an exam twist designed to catch you.

Before we compute anything, let's name the three machines we will keep feeding numbers into. Each is stated in plain words first.


The scenario matrix

Every worked example below is tagged with the cell it covers. The goal: no reader ever meets a case we skipped.

Cell Case class What makes it tricky Example
A Standard conv output + params the everyday VGG layer Ex 1
B Degenerate kernel smallest kernel, no spatial mixing Ex 2
C Zero padding (, "valid") border pixels get eaten, size shrinks Ex 3
D Pooling (not conv) kernel = stride = 2, no parameters Ex 4
E Deep stack RF, limiting/growth how RF grows across many layers Ex 5
F Real-world word problem memory/RAM budget for a batch Ex 6
G Exam twist: stacked-vs-big trade the classic "two 3×3 = one 5×5" trap Ex 7
H Odd input / floor rounding bites non-divisible size, floor matters Ex 8

Worked examples









Recall

Same-padding output for stride 1 ::: (size unchanged) Params of Conv3-256 on 128-channel input ::: Parameters in any max-pool layer ::: — it just takes the max, nothing learned Receptive field of stacked stride-1 convs ::: Weight saving of two vs one ::: (plus an extra ReLU) Why VGG keeps sizes even down to 7 ::: so pooling's floor never silently drops a border pixel Where most of VGG-16's 138M params live ::: the fully-connected classifier, not the convs

Related: 3.5.02-batch-normalization (why deep VGG was hard to train pre-BN), 3.4.15-transfer-learning (where VGG's rich features still win), and the Hinglish version.