P
Pretrained models — ResNet, VGG, EfficientNet on ImageNet
Rather than training a CNN from scratch (which needs millions of images), transfer learning starts with a model like ResNet, VGG, or EfficientNet already pretrained on ImageNet (1.2 million images, 1000 classes).
Example: starting with a ResNet model already trained on the full 1.2-million-image ImageNet dataset, rather than starting from randomly initialized weights.
F
Freeze — keeping early layers unchanged
The early layers of the pretrained model, which already detect general edges, textures, and shapes, are frozen (kept unchanged), since these general visual features are broadly reusable across almost any vision task.
Example: freezing a pretrained ResNet's early convolutional layers, since they already detect general-purpose edges and textures useful for virtually any image task.
R
Replace — swapping the final classification layer
The final classification layer, which was originally trained to output ImageNet's 1000 specific classes, is replaced with a new layer suited to your specific task's classes.
Example: replacing ImageNet's original 1000-class output layer with a new layer outputting just the 5 specific classes relevant to your particular task.
T
Train — only the last few layers on your small dataset
Only the last few layers (including the newly replaced classification layer) are actually trained on your smaller, task-specific dataset, since the early general-purpose layers are already frozen and don't need retraining.
Example: training only the final few layers of the network on your specific 500-image dataset, leveraging the already-frozen, general-purpose early layers rather than retraining the entire network from scratch.
Applied Walkthrough
1
A team needs to build an image classifier for a specialized task but only has 500 labeled training images — far too few to train a deep CNN from scratch.
2
They start with a ResNet model already pretrained on the full 1.2-million-image ImageNet dataset, rather than starting with randomly initialized weights.
3
They freeze the early layers (which already detect general edges, textures, and shapes) and replace the final classification layer with one suited to their specific task's classes.
4
Training only these last few layers on their 500 images, they leverage the "borrowed eyes" of the pretrained early layers, achieving strong performance despite having far too little data to have trained a comparable model entirely from scratch.
Exam Application
Exams test whether you understand the transfer learning workflow (start with a pretrained model, freeze early layers, replace and train only the final layers) and why this approach works — general-purpose low-level visual features (edges, textures, shapes) transfer well across almost any vision task, even when your specific task has very limited training data.
⚠ Common Trap
The most common trap is assuming transfer learning requires retraining the entire network, just starting from pretrained weights instead of random ones. In practice, the standard approach specifically freezes the early general-purpose layers and only trains the final few task-specific layers, since retraining everything would both be unnecessary and risk overfitting on a small dataset.
✓ Quick Self-Check
1. Why is training a CNN from scratch often impractical for a specific task?
Because it typically requires millions of training images, far more than most specific tasks have available.
Tap to reveal / hide
2. What dataset are common pretrained CV models like ResNet, VGG, and EfficientNet typically trained on?
ImageNet — 1.2 million images across 1000 classes.
Tap to reveal / hide
3. Why are the early layers of a pretrained model typically frozen during transfer learning?
Because they already detect general-purpose edges, textures, and shapes that are broadly reusable across almost any vision task.
Tap to reveal / hide
4. What happens to the final classification layer during transfer learning?
It's replaced with a new layer suited to the specific task's classes, since the original was trained for ImageNet's 1000 classes.
Tap to reveal / hide
5. Which layers are actually trained on the new, smaller task-specific dataset?
Only the last few layers, including the newly replaced classification layer.
Tap to reveal / hide