What Are the Layer Shapes in VGG-16?

VGG-16: 224 → 224 → 112 → 112 → 56 → 56 → 56 → 28 → 28 → 28 → 14 → 14 → 14 → 7 → 7 → 7 → Flatten(25088) → 4096 → 4096 → 1000

Complete Shape Trace

Input:           (batch,  3, 224, 224)

# Block 1 — 2 conv layers
Conv3x3(64) + ReLU    (batch, 64, 224, 224)
Conv3x3(64) + ReLU    (batch, 64, 224, 224)
MaxPool2d(2, 2)       (batch, 64, 112, 112)

# Block 2 — 2 conv layers
Conv3x3(128) + ReLU    (batch, 128, 112, 112)
Conv3x3(128) + ReLU    (batch, 128, 112, 112)
MaxPool2d(2, 2)       (batch, 128, 56, 56)

# Block 3 — 3 conv layers
Conv3x3(256) + ReLU    (batch, 256, 56, 56)
Conv3x3(256) + ReLU    (batch, 256, 56, 56)
Conv3x3(256) + ReLU    (batch, 256, 56, 56)
MaxPool2d(2, 2)       (batch, 256, 28, 28)

# Block 4 — 3 conv layers
Conv3x3(512) + ReLU    (batch, 512, 28, 28)
Conv3x3(512) + ReLU    (batch, 512, 28, 28)
Conv3x3(512) + ReLU    (batch, 512, 28, 28)
MaxPool2d(2, 2)       (batch, 512, 14, 14)

# Block 5 — 3 conv layers
Conv3x3(512) + ReLU    (batch, 512, 14, 14)
Conv3x3(512) + ReLU    (batch, 512, 14, 14)
Conv3x3(512) + ReLU    (batch, 512, 14, 14)
MaxPool2d(2, 2)       (batch, 512,  7,  7)

# Classifier
Flatten           (batch, 25088)      # 512 * 7 * 7
Linear(25088, 4096) + ReLU (batch, 4096)
Linear(4096, 4096) + ReLU (batch, 4096)
Linear(4096, 1000)     (batch, 1000)

Key Observations

Try the Parameter Counter

TENSOR PREFLIGHT · DOWNLOADABLE PYTORCH TOOLKIT

Take the next step in your own PyTorch model.

Trace a local forward pass, inspect tensor shapes in an HTML report, and turn a repair into a regression check. Includes eight broken-and-fixed workflows, source code and setup instructions.

Is this toolkit right for my problem?

Use the free calculator for a layer formula or a quick shape check.

Consider Tensor Preflight when you have a local PyTorch model and want a forward-pass report plus repeatable checks. Python 3.9+ and PyTorch 2.8+ are required. It does not run your model in this website or automatically repair it.

Open the sample report before buying to check the output format.

Python 3.9+ · PyTorch 2.8+ · Runs locally

Get Tensor Preflight — $29 One-time payment · ZIP download See a sample report
By the same builder: GitHub, theluckystrike BeLikeNative, Grammar AI EarlyThunder, Dev Blog Bug Bounty Reality Zovo, AI Dev Tools