Brief
Oxford Flowers 102 has 102 flower species and only 10 training photos for each one. That is a recipe for overfitting: the model memorises the training photos and does badly on new ones. In this project you watch that happen, then fight it with three tools: weight decay, dropout and data augmentation.
You won't train a vision network from scratch yet. That comes in BL-14. Instead, a ResNet-18 pretrained on ImageNet
turns each photo into 512 numbers, and you train an MLP on those features. Treat the ResNet as a frozen black box:
torchvision.models.resnet18 with ResNet18_Weights.IMAGENET1K_V1, and its fc layer replaced by
torch.nn.Identity(). Load the photos with torchvision.datasets.Flowers102, which provides the official train,
validation and test splits of 1,020, 1,020 and 6,149 images.
Weight decay adds a penalty to the loss, which pulls weights towards zero. Dropout zeroes each hidden unit with probability during training and scales the survivors by , so no unit can rely on any other. Augmentation shows the model a different random crop or mirror image of each photo, so it can't memorise exact pixels.
One rule keeps this honest. Tune everything on the validation split. Look at the test split once, at the very end.
DATA · Oxford Flowers 102
Objectives
Read-only. Log in to update progress.
VICTORY CONDITIONS
- Your validation accuracy is within 2 points of the PyTorch reference head, recorded with `python tools/mlarena.py record BL-13 "<yours>% vs <reference>%"`.
- Your dropout and weight decay are your own code, not nn.Dropout or an optimiser's weight_decay argument.
- The README has the train and validation curves before and after regularisation, an ablation table, and one test accuracy per model, measured once.
Side quests
Terms in plain words
- Overfitting
- When a model learns the training examples so well, quirks included, that it does worse on examples it hasn't seen.
- Weight decay
- Shrinking every weight a little towards zero at each step, which stops any one weight from growing large to fit noise.
- Dropout
- Randomly switching off a fraction of hidden units on each training step, so the network can't depend on any single unit.
- Data augmentation
- Showing the model randomly altered copies of each training image, such as crops and mirror images, so it sees more variety.
- Frozen features
- The output of a pretrained network whose weights you never update. You use it as a fixed summary of each image.