Deep Learning · TEE · 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 dataset | Sensible starting choice | Reason |
|---|---|---|
| Small and similar | Freeze the backbone; train a new head first | Useful features already exist, while few examples make overfitting likely |
| Large and similar | Train a new head, then fine-tune more layers if validation improves | More data can support more trainable parameters |
| Small and different | Try a more relevant pretrained model or fixed earlier/intermediate features; tune cautiously | Later source features may be unsuitable, but small data still makes extensive tuning risky |
| Large and different | Compare broad fine-tuning with training from scratch | Sufficient 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.