The result
A roughly 151,000-parameter model with checkpointed SGD/momentum training.
Image classification with repeatable training and evaluation
Academic experiment
Made a 100-class image-training experiment resumable through best-model checkpoints and per-epoch evaluation in a roughly 151,000-parameter LeNet implementation.
From the repository
A LeNet-style convolutional neural network, trained from scratch in PyTorch to classify the 100 fine-grained classes of CIFAR-100 (32×32 RGB images).
input 3×32×32
→ Conv2d(3→6, 5×5) → ReLU → MaxPool 2×2 → 6×14×14
→ Conv2d(6→16, 5×5) → ReLU → MaxPool 2×2 → 16×5×5
→ Flatten → 400
→ Linear(400→256) → ReLU
→ Linear(256→128) → ReLU
→ Linear(128→100) → class logits
That's about 151K trainable parameters. forward() returns the logits plus a dictionary of each stage's output shape, which makes it easy to sanity-check the architecture.
| File | Purpose |
|---|---|
lenet.py | Model definition, parameter count, train and test loops |
dataloader.py | CIFAR-100 dataset: download, extraction, and PyTorch Dataset |
train_cifar100.py | Training entry point with checkpointing and resume |
eval_cifar100.py | Evaluate a saved checkpoint on the test set |
pip install -r requirements.txt
python train_cifar100.py --epochs 10 --lr 0.001 --batch-size 32
python train_cifar100.py --resume outputs/checkpoint.pth.tar # continue training
python eval_cifar100.py --load outputs/model_best.pth.tar
Data is cached under data/ and checkpoints are written to outputs/. Neither is committed.
Date finished: April 7, 2025
Continue exploring · 34 projects

Fullstack

ML & AI

ML & AI

ML & AI
Distributed Systems

Fullstack

ML & AI
Distributed Systems

Distributed Systems
Distributed Systems
Distributed Systems

Data Engineering
Data Engineering

Data Engineering

Data Engineering

Data Engineering

ML & AI
ML & AI
Data Engineering

Fullstack

Fullstack
Fullstack

Fullstack

Fullstack
Data Engineering
Computing Foundations

Fullstack

Fullstack
ML & AIViewing
ML & AI

ML & AI
ML & AI
ML & AI
ML & AI