MNIST from scratch
NumPyPyTorchPythonNeural Network ImplementationPaper ReadingDeep Learning
The problem
I wanted to understand the operations that turn handwritten pixels into a prediction.
How I solved it
Building a neural network from scratch to classify handwritten digits from the MNIST dataset. Implemented forward and backward propagation, gradient descent, and backpropagation using only Numpy and basic mathematical operations.
- Built neural network from scratch for MNIST
- Implemented forward and backward propagation
- Created gradient descent algorithm
- Used only NumPy and basic math operations
The results
- recorded validation accuracy
- 90.08%
- trainable parameters
- 7,960
The later PyTorch tensor notebook records 90.08% validation accuracy on 16,800 images with 7,960 trainable parameters. Delivered original NumPy and GPU-capable tensor implementations.
Evaluation context. Development-validation result from the PyTorch variant at iteration 2,490. Not the original NumPy result or the canonical 10,000-image MNIST test benchmark.