Three-part deep learning project tracing CNN evolution from LeNet-5 to ResNet-50 — all architectures built from scratch in PyTorch, with a batch normalization ablation study and full training benchmarks on FashionMNIST.
Full results, training curves, and architecture breakdown: https://sadhanageddam27.github.io/cnn-architecture-evolution/
cnn-architecture-evolution/
├── Part1/
│ ├── Part1.ipynb
│ ├── LeNet.ipynb
│ ├── LeNet_MNIST.ipynb
│ └── Visualization.ipynb
├── Part2/
│ └── Batch_Norm.ipynb
└── Part3/
├── ResNet_part1.ipynb
└── ResNet_part2.ipynb
| Component | Original LeNet | Modernized LeNet |
|---|---|---|
| Activation | Sigmoid | ReLU |
| Pooling | Average | Max |
| Convergence | Slow | Faster |
Trained across 5, 10, and 20 epoch configurations on MNIST and FashionMNIST.
Implemented batch normalization manually with learnable gamma and beta parameters. Three variants compared: full BN, mean-only, and variance-only. Ablation study tested selective BN placement across layers.
BasicResidual block for ResNet-18/34: two 3x3 convolutions with skip connection. Bottleneck block for ResNet-50: 1x1 → 3x3 → 1x1 with skip connection, mid_channels = out_channels divided by 4.
| Model | Best Accuracy | Final Train Loss | Training Time |
|---|---|---|---|
| ResNet-18 | 90.37% | 0.2081 | 62.4s |
| ResNet-34 | 89.70% | 0.2327 | 88.8s |
| ResNet-50 | 88.27% | 0.2756 | 53.4s |
ResNet-18 achieved the highest accuracy despite fewer parameters. All three models converge without overfitting, confirming the effectiveness of residual connections.
git clone https://github.com/sadhanageddam27/cnn-architecture-evolution.git
cd cnn-architecture-evolution
pip install torch torchvision matplotlib jupyter d2l
jupyter notebook
Python · PyTorch · torchvision · d2l · Jupyter · Matplotlib
deep-learning pytorch cnn resnet lenet batch-normalization computer-vision fashionmnist python