A collection of deep learning paper implementations in PyTorch, trained and evaluated on standard benchmarks.
| # | Paper | Dataset | Directory |
|---|---|---|---|
| 1 | AlexNet — ImageNet Classification with Deep Convolutional Neural Networks (Krizhevsky et al., 2012) | CIFAR-10 | AlexNet/ |
| 2 | Deep Residual Learning for Image Recognition (He et al., 2015) | Imagenette | ResNet/ |
PyTorch implementation of AlexNet adapted for CIFAR-10.
- Python 3.8+
- PyTorch
- TorchVision
cd AlexNet
pip install -r requirements.txtpython train.py| Argument | Description | Default |
|---|---|---|
--data-dir |
Directory to store CIFAR-10 data | ./data |
--epochs |
Number of training epochs | 5 |
--batch-size |
Batch size for training | 64 |
--lr |
Learning rate | 0.01 |
--momentum |
Momentum for SGD | 0.9 |
--weight-decay |
Weight decay for SGD | 0.0005 |
--save-path |
Path to save trained model weights | alexnet.pth |
Example:
python train.py --epochs 10 --batch-size 128 --lr 0.005| File | Description |
|---|---|
train.py |
AlexNet model definition and training loop |
alexnet.ipynb |
Jupyter notebook for interactive exploration |
requirements.txt |
Python dependencies |
NIPS-2012-imagenet-classification-with-deep-convolutional-neural-networks-Paper.pdf |
Original paper |
A beginner-friendly ResNet-34 implementation (BasicBlock only) trained on Imagenette — a 10-class subset of real ImageNet images at 224×224. Same preprocessing pipeline as ImageNet, but auto-downloads and runs in reasonable time on a free GPU.
- Python 3.8+
- PyTorch
- TorchVision
pip install torch torchvisionTraining ResNet-34 at 224×224 needs a GPU. Colab is the easiest way to run this — free GPU, no local setup.
- Open
ResNet/run_on_colab.ipynbin Google Colab - Upload
resnet.pyandtrain_resnet.pyto the notebook session (or clone this repo in Colab) - Set runtime to GPU (Runtime → Change runtime type)
- Run all cells — Imagenette downloads automatically
cd ResNet
python train_resnet.pyEdit the config at the top of train_resnet.py to change epochs, batch size, learning rate, etc. Lower BATCH_SIZE (e.g. 16) if you run out of VRAM on a small GPU. CPU-only training works but will be very slow.
| Setting | Value |
|---|---|
| Architecture | ResNet-34 ([3, 4, 6, 3] layers) |
| Dataset | Imagenette (10 classes, 224×224) |
| Epochs | 15 |
| Batch size | 32 |
| Optimizer | Adam, lr 1e-3 |
| File | Description |
|---|---|
resnet.py |
ResNet-34 model (BasicBlock + ResNet class) |
train_resnet.py |
Training and validation loop |
run_on_colab.ipynb |
Colab notebook — recommended way to run |
The model uses an ImageNet-style stem (7×7 conv, 224×224), so it can train on full ImageNet in principle — but that means ~150GB of data, manual download from image-net.org, and days of GPU time. Imagenette is the practical stand-in for learning and testing this code.
Each paper lives in its own subdirectory with a self-contained train.py, requirements.txt, and the original PDF.