Deep Learning · MT2 · section

Choosing frozen layers from dataset size and similarity

CNN architectures and transfer learning

Early image layers commonly learn reusable edges and textures. Later layers become more specialized to source-task categories. “Earlier” means closer to the input, regardless of whether a drawing places those layers at the top or bottom.

Target datasetSensible starting choiceReason
Small and similarFreeze the backbone; train a new head firstUseful features already exist, while few examples make overfitting likely
Large and similarTrain a new head, then fine-tune more layers if validation improvesMore data can support more trainable parameters
Small and differentTry a more relevant pretrained model or fixed earlier/intermediate features; tune cautiouslyLater source features may be unsuitable, but small data still makes extensive tuning risky
Large and differentCompare broad fine-tuning with training from scratchSufficient data permits stronger adaptation; the value of source features must be tested

These are starting strategies, not universal rules. Fine-tuning an early layer means updating its pretrained weights, not automatically learning it “from scratch”. With very little data, simply unfreezing early layers because the task differs can overfit. Choose changes using validation performance and apply the required preprocessing consistently.

Example. With 100 labelled microscopic images, an ImageNet model may provide reusable low-level patterns, but its animal/object classifier is inappropriate. Replace the head, test fixed representations and monitor validation before increasing the number of trainable layers. With a large representative image dataset, broader fine-tuning becomes a more reasonable candidate.

Yaad rakho: data kam toh kam weights hilao; task alag toh features ki suitability pehle dekho.