Skip to content

Track 05

ResNet, BERT, and Fine-Tuning

This track makes transfer learning operational: replace the head, choose how much to freeze, compare reuse against scratch, and inspect whether the added adaptation cost is actually justified.

Primary Goal

Adapt Only As Much As Needed

Use this track when you want transfer learning to be a defensible workflow choice instead of a default prestige move.

You Will Practice

Heads, Freezing, Transfer

Head replacement, frozen and partially unfrozen backbones, parameter-group learning rates, scratch comparisons, and confusion-based inspection.

Exit Rule

One Defensible Adaptation Choice

You are done when you can defend the cheapest acceptable adaptation depth for the task instead of simply reporting the highest score.

Use This Track When

  • the training-loop workflow is already stable
  • you are ready to compare scratch, frozen, partial, and full adaptation honestly
  • you need transfer learning to feel like a sequence of decisions rather than a magic upgrade

What This Track Is Training

This track trains one practical rule:

  • use more adaptation only when the error pattern and validation evidence justify the added cost

That means the learner should be able to keep these explicit:

  • what the scratch baseline can already do
  • which parameters are trainable at each adaptation depth
  • whether the head and backbone should share a learning rate
  • what changed in the confusion pattern after transfer

First Session

Use this order:

  1. Transfer and Fine-Tuning
  2. run academy/.venv/bin/python academy/examples/deep-learning-recipes/transfer_finetuning_demo.py
  3. note what is frozen, what is trainable, and where the head is replaced
  4. write one sentence on when a scratch baseline should still be your first comparison

Full Track Loop

For the complete workflow:

  1. review the transfer topic
  2. run the transfer example from repo root
  3. run academy/.venv/bin/python academy/labs/resnet-bert-and-finetuning/src/pretrained_transfer_workflow.py
  4. compare scratch, frozen, partial_unfreeze, and full_finetune before trusting the winner
  5. inspect the confusion outputs and trainable-parameter counts
  6. finish the matching exercises in academy/exercises/resnet-bert-and-finetuning/
  7. keep one short adaptation note with the cheapest acceptable strategy for each modality

What To Inspect

By the end of the track, the learner should have inspected:

  • one scratch baseline against all transfer variants
  • one frozen run that is actually frozen
  • one partial-unfreeze comparison against both extremes
  • one head versus backbone learning-rate plan
  • one confusion pattern that changed in a useful way after adaptation
  • one case where the headline score moved less than the error pattern

Common Failure Modes

  • assuming full fine-tuning is automatically best
  • forgetting to compare against scratch
  • accidentally leaving backbone parameters trainable during a frozen run
  • using one learning rate for all parameters without justification
  • trusting overall accuracy while ignoring the confusion pattern

Exit Standard

Before leaving this track, the learner should be able to:

  • defend the chosen adaptation depth for the vision-style workflow
  • defend the chosen adaptation depth for the text-style workflow
  • explain what the confusion outputs revealed that the headline metric hid
  • say what smaller transfer experiment should happen next, if any

That is enough to move into harder modality or production-style tracks without treating transfer learning as a black box.