Repository navigation
Release: v1.1.0 – Final Submission
Overview
This is the first official release of the MNIST Optimization Project. It includes a complete end-to-end implementation of a logistic regression classifier on the binary MNIST dataset (0 vs. not-0), with manual implementations of key optimization algorithms and training workflows.
Included Features
- Binary MNIST classifier using NumPy (flattened images, custom logistic regression model)
- Custom optimization algorithms:
- Stochastic Gradient Descent (SGD) with fixed learning rates
- SGD with decreasing learning rate
- SGD with Momentum
- Adam optimizer (with and without bias correction)
- Training utilities:
- Loss tracking during training
- Smoothed loss curve visualization using Matplotlib
- Final loss values printed in terminal
Outputs
- Two plots saved to the
plots/folder:sgd_momentum.png: Loss comparison of SGD variants and Momentumadam_comparison.png: Loss comparison of Adam (with vs. without bias correction)
- Final loss values displayed in terminal
Documentation
README.mdwith run instructions, project description and report
Getting Started
pip install torch torchvision matplotlib numpy
python main.pyContributors
- Rizik Haddad (SGD and project report)
- Sam Buttonow (Momentum and Adam)