CIFAR-10 classification with MobileNetV3 Small
Model
A torchvision MobileNetV3 Small initialized with ImageNet pretrained weights and fine-tuned on CIFAR-10 using a GPU in Google Colab.
The final classification layer predicts 10 classes: airplane, automobile, bird, cat, deer, dog, frog, horse, ship, truck.
Training
- Training images: 45,000
- Validation images: 5,000
- Test images: 10,000
- Epochs: 5
- Batch size: 64
- Optimizer: AdamW
- Learning rate: 0.001
- Seed: 42
The checkpoint was selected using validation accuracy. The test set was evaluated after checkpoint selection.
Test results
- Accuracy: 0.8969
- Macro F1: 0.8976
- Best epoch: 3
Per-class metrics and the confusion matrix are available in eval/.
Files
model.pth: PyTorch state dictionary.config.json: architecture, class names and preprocessing settings.eval/: evaluation results.
Loading and preprocessing
Instantiate torchvision.models.mobilenet_v3_small(weights=None).
Replace the final classifier layer with a linear layer for 10 classes
and load model.pth with load_state_dict.
Convert images to RGB, resize to 128 x 128,
convert to tensors and normalize using the mean and standard
deviation from config.json. Use evaluation mode during inference.
Limitations
The model always chooses among the 10 CIFAR-10 classes. It does not detect unknown classes or locate objects. Results on arbitrary high-resolution photographs may differ from results on the CIFAR-10 test set.