ResNet on Imagenette
A ResNet I trained from scratch as a learning project.
Model details
- Architecture: custom ResNet (10-class classifier)
- Dataset: Imagenette (320px)
- Input size: 320x320
- Epochs: 30
- Best val accuracy: 88.01%
- Splits: train 9,469 / val 1,309 / test 2,616
Training curves
| Epoch | Loss | Val Acc |
|---|---|---|
| 1 | 1.885 | 0.4293 |
| 2 | 1.419 | 0.5714 |
| 3 | 1.201 | 0.6050 |
| 4 | 1.055 | 0.6325 |
| 5 | 0.942 | 0.6646 |
| 6 | 0.858 | 0.7013 |
| 7 | 0.788 | 0.7517 |
| 8 | 0.738 | 0.7219 |
| 9 | 0.699 | 0.7387 |
| 10 | 0.636 | 0.6234 |
| 11 | 0.621 | 0.7647 |
| 12 | 0.580 | 0.7578 |
| 13 | 0.557 | 0.7189 |
| 14 | 0.524 | 0.7800 |
| 15 | 0.498 | 0.8189 |
| 16 | 0.350 | 0.8610 |
| 17 | 0.299 | 0.8625 |
| 18 | 0.287 | 0.8640 |
| 19 | 0.270 | 0.8663 |
| 20 | 0.263 | 0.8587 |
| 21 | 0.260 | 0.8724 |
| 22 | 0.248 | 0.8694 |
| 23 | 0.235 | 0.8686 |
| 24 | 0.232 | 0.8717 |
| 25 | 0.233 | 0.8701 |
| 26 | 0.221 | 0.8747 |
| 27 | 0.205 | 0.8648 |
| 28 | 0.203 | 0.8755 |
| 29 | 0.188 | 0.8801 |
| 30 | 0.191 | 0.8770 |
Usage
import torch
from huggingface_hub import hf_hub_download
model = ResNet(num_classes=10)
ckpt = hf_hub_download(repo_id="lazy-toad/resnet-imagenette", filename="resnet-imagenette.pt")
model.load_state_dict(torch.load(ckpt, map_location="cpu"))
model.eval()