A custom CNN achieving over 99% test accuracy on MNIST — from data augmentation to deployment-ready model.
- Custom CNN architecture (2 conv blocks + FC head)
- Data augmentation (rotation, perspective) for robustness
- Adam optimizer with dropout for 99%+ accuracy in 10 epochs
- M3 Air optimized (MPS backend) — trains in <5 minutes locally
- Test Accuracy: 99.29%
- Training Loss Curve: results/loss-curve.png
- Access saved model path results/mnist_cnn_99.pth
# Install
pip install -r requirements.txt
# Run notebook
jupyter notebook code/mnist_cnn.ipynb