Everything, in one script
This is the whole track collapsed into one runnable workflow — the thing you'll copy into every new image-classification project. Read it as the recipe from lesson 6 made concrete: load a frozen EfficientNetV2S backbone, attach a small head, train the head (phase 1), then unfreeze the top layers and fine-tune at 1e-5 (phase 2). The Code section is the complete program.
The head choices worth noticing
This head is one step richer than the bare feature-extraction lesson: after GlobalAveragePooling2D it adds a Dense(128, relu) bottleneck before the final classifier. That extra layer gives the model a little room to recombine backbone features for your specific classes, and the Dropout(0.3) keeps it honest on small data. Swap the final Dense(5, softmax) to match your class count, and adjust input_shape if your backbone preset expects a different resolution.
From this template to a real project
To take this further, the only moving parts are the data pipeline (your train_ds / val_ds) and the two epoch counts. Everything else — the freeze/unfreeze dance, the two compiles, the 100× LR drop — stays exactly as written. That's the point of having a template: the transfer-learning mechanics become muscle memory and you spend your attention on the data and the metric.