Lensa ML
Lensa ML

How Transfer Learning Works

Step 1 of 6

Training From Scratch Is Expensive

Millions of images, days of compute

EMPTY MODEL1.2MimagesGPU7 daysof trainingTRAINED0% — Day 0 of 7What if we could skip this?

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

EMPTY MODEL1.2MimagesGPU7 daysof trainingTRAINED0% — Day 0 of 7What if we could skip this?

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

IMAGENET-PRETRAINED MODELGENERAL FEATURESTASK-SPECIFIC FEATURESedgestexturesshapespartsobjectsclassesThese features generalize across many visual tasks

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

EDGE DETECTORSShallowDiagonalHorizontalVerticalDepth: 1/3TEXTURE DETECTORSMidGridDotsStripesDepth: 2/3PART DETECTORSDeepCircleRectangleArchDepth: 3/3

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

Freeze layers:4
Conv1fixedConv2fixedConv3fixedConv4fixedFC1learningOutputlearningFROZEN — weights unchangedTRAINABLE — adapts to your dataStandard transfer — freeze base, train 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

DATA REQUIRED1,000,000From Scratch1,000Fine-Tuned1000× less dataCONVERGENCE SPEEDEpochsAccuracy0%50%95%92%From scratchFine-tunedEpoch: 0/50

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

DATASET SIZE →DOMAIN SIMILARITY →SmallLargeHighLowFine-Tune TopSmall data, similar domainFine-Tune AllLarge data, similar domainFreeze AllSmall data, different domainTrain From ScratchLarge data, different domainHover a quadrant to see the recommended strategy

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.