Skip to main content

What is transfer learning, and when would you use it?

Deep learning · Intermediate 2

Short answer

Transfer learning starts from a model pretrained on a large dataset and adapts it to your task, instead of training from scratch. You can freeze the pretrained layers and train a new head, or fine-tune some or all layers with a small learning rate. Use it whenever data is limited and a related pretrained model exists.

Deeper answer

The early layers of a vision model learn general features such as edges and textures that transfer to almost any images; later layers are more task-specific. With a few hundred labelled images you might freeze the backbone and train only a classifier; with tens of thousands you can fine-tune more layers.

The same idea drives language models: a pretrained LLM fine-tuned or prompted for your task is transfer learning. Watch for domain mismatch, such as models pretrained on photos used for X-rays, and use the same preprocessing the pretrained model expects.

What a strong answer covers

Answer it out loud in the mock interview about 1 min

Follow-ups to expect

Common mistakes

Learn it

CNNs for images

Today's AI turns are used

Lessons, roadmaps, videos, practice cards and the code playground stay free with your account, with no limit.