CNN Architectures (ResNet, VGG, EfficientNet)
Part of the AI Engineer Roadmap
In short
You will rarely design a CNN from scratch. You'll pick ResNet, VGG or EfficientNet off the shelf. Knowing what each one changed helps you choose the right one for speed, size and accuracy.
Landmark CNN designs — ResNet introduced skip connections to train very deep networks, VGG popularized deep stacks of small filters, EfficientNet optimized accuracy-per-parameter.

Think of it like this
Three ways to build a tall building
VGG is a plain building: the same floor repeated, very tall and heavy. ResNet adds an express lift so people can skip floors, which lets it go much taller safely. EfficientNet is the architect who balances height, width and window size together for the best value.
Watch it happen
What each family is known for
1/5All three are convolutional networks trained on ImageNet. They differ in how they stack layers.
The big ideas
What you need to know
Deeper is not free
Before ResNet, adding layers often made training worse, because gradients faded on the way back.
Skip connections
ResNet computes output = F(x) + x. The block only learns the change, and the shortcut keeps gradients alive.
Accuracy per parameter
VGG-16 has around 138 million parameters. EfficientNet-B0 has about 5 million and does better on ImageNet.
Pick for your device
On a phone, look at small models like EfficientNet-B0 or MobileNet. On a server GPU, ResNet-50 is a safe start.
See it in code
Walk through the code
1import torch.nn as nn2 3class ResidualBlock(nn.Module):4 def __init__(self, ch):5 super().__init__()6 self.conv1 = nn.Conv2d(ch, ch, 3, padding=1)7 self.bn1 = nn.BatchNorm2d(ch)8 self.conv2 = nn.Conv2d(ch, ch, 3, padding=1)9 self.bn2 = nn.BatchNorm2d(ch)10 self.relu = nn.ReLU()11 12 def forward(self, x):13 out = self.relu(self.bn1(self.conv1(x)))14 out = self.bn2(self.conv2(out))15 return self.relu(out + x) # the skip connection1/3Two 3x3 convolutions with batch norm. Padding 1 keeps height and width the same.
A simplified ResNet basic block. The whole trick is adding x back on the last line.
Save yourself the pain
Common mistakes
Oops
Picking the biggest model because it tops the leaderboard.
Do this instead
Check latency and memory on your target device. A smaller model that runs in 20 ms often beats a better one that takes 2 seconds.
Oops
Thinking skip connections just copy the input forward.
Do this instead
They add the input to what the block learned, so the block learns a correction. Shapes must match, or a 1x1 conv adjusts them.
Your mission
Compare three backbones
Quick check
What problem did ResNet's skip connections mainly solve?
Go deeper
- 1Load a pretrained ResNet and use it for transfer learning on a custom dataset.
- 2Learn what skip connections in ResNet solve (vanishing gradients in deep networks).
- 3Compare model size and accuracy trade-offs across ResNet, VGG and EfficientNet.
More topics at this stop
Stuck on this topic? Ask an Insider
Get 1:1 guidance from people who've walked this exact path — on the InsideEdge app.