This part built a residual block that keeps gradient flowing across depth, and a fine-tuning trick that keeps a small target task cheap to solve. Put them together: freeze a residual "backbone" entirely, and fine-tune only a tiny task-specific head on top of it.
Two raw inputs pass through the exact same frozen residual block from earlier in this part. The backbone itself never changes — only its output becomes the input to whatever small head gets trained next.
A "pretrained model" here is just the residual recursion from earlier — , weights fixed — reused as a frozen feature extractor:
- — the frozen backbone's output for a given input: the representation the head trains on.
- — the frozen, pretrained residual network reused as a fixed feature extractor.
- — the task-specific head's weight, applied to the backbone's feature.
- — the task-specific head's bias — in this example, the only parameter still being learned.
- Fine-tuning leaves almost nothing to learn
Fine-tuning freezes the backbone and, in this example, even freezes at its correct pretrained value — leaving only to learn.
- From scratch means finding both head parameters together
Training from scratch instead has to find and together, using the same two backbone features and the same tiny dataset.
Fine-tuning the head's one remaining parameter reaches an exact fit in a single step. Training both head parameters from scratch is still measurably behind after 10 steps, and only approaches — never exactly matches — that same result even after 50.
Backbone inputs and , one frozen residual layer, head target :
- The frozen backbone produces two well-separated features
With one frozen layer and , :
Different enough that the two-point target line is easy to recover, not a near-duplicate pair.
- Fine-tuning the head's bias: solved in one step
With frozen at its correct value, lands exactly. MSE (short for Mean Squared Error): .
- From scratch: the same ideal rate explodes; a safe one crawls
That same , applied to both head parameters jointly from , explodes to within 3 steps. A safe instead reaches MSE after 10 steps and only MSE after 50 — closer, but still not the exact that freezing the backbone got in a single step.
Find the learning rate, among the three candidates, that makes from-scratch head training explode within 3 steps.
Nothing in this capstone is new mechanically — it's the residual block from earlier in this part, and the exact fine-tuning math from a few chapters back, applied to features instead of raw inputs. That's the actual practice of transfer learning: someone else's frozen backbone plus a small trained head, and every optimization lesson from this entire course — ideal learning rates, coupled parameters, the cost of starting from nothing — still applies to whatever tiny piece is left to fine-tune. This closes Part X — Advanced Architectures. The next part turns back to explainability, this time for the deeper, less transparent models built here.