How Transfer Learning Works
Training From Scratch Is Expensive
Millions of images, days of compute
Training a deep network from random weights requires millions of labeled images, days of GPU compute, and careful tuning. What if someone already did this work — and we could reuse their model?
Step 1 of 6: Training From Scratch Is Expensive
Millions of images, days of compute
Training a deep network from random weights requires millions of labeled images, days of GPU compute, and careful tuning. What if someone already did this work — and we could reuse their model?
Step 2 of 6: Pretrained Models
Standing on the shoulders of giants
Models trained on ImageNet (1.2M images, 1000 classes) learn a hierarchy of features. Early layers detect universal patterns like edges and textures — these are useful for almost any vision task.
Step 3 of 6: Feature Reuse
Early layers learn universal patterns
Layer 1 detects simple edges. Layer 2 combines edges into textures. Layer 3 assembles textures into parts. These features are universal — they work for cats, cars, or X-rays.
Step 4 of 6: Freeze and Fine-Tune
Keep the base, retrain the top
Frozen layers keep their pretrained weights — no gradient updates. Trainable layers adapt to your new task. The slider controls the boundary: freeze more for small datasets, less for large ones.
Step 5 of 6: Your Small Dataset Is Enough
Fine-tuning needs far less data
Fine-tuning starts with already-good features, so it converges much faster. With only 1,000 images you can match the accuracy that training from scratch needs 1,000,000 images to reach.
Step 6 of 6: When to Transfer
Practical guide to transfer learning decisions
The right transfer strategy depends on two factors: how much data you have, and how similar your task is to the pretrained domain. Small + similar? Just fine-tune the top. Large + different? Train from scratch.