MNIST Neural Network from Scratch
A neural network that recognizes handwritten digits with 98% precision
Objective: Build a neural network from scratch for the MNIST database.
- Built from scratch with numpy
- Optimized neural network with 98% precision after 20 epochs of training
- Major changes from v1:
- Switched from batch gradient descent to mini-batch gradient descent
- Added momentum to descent algo
- Better initialization of weights


Sample digits from the MNIST database (left) and a simple visual of how the neural network trains on them (right).
(Ali, 2024) contains python code for both v1 and v2 of the neural network.
Helpful Resources
- Codecademy's courses on deep learning and neural networks
- Official page for MNIST database (LeCunn et al., 1994)
- Johnathan Weisberg's blogs on neural networks (Weisberg, 2018)