Digit Classifier

LeNet Convolutional Neural Network

Trained and tested on the EMNIST dataset

Implementation Note: This is an attempt at implementing the 1998 LeNet CNN research paper. No libraries like TensorFlow or PyTorch were used - it's built from scratch using NumPy.

🎯 The model may vary in prediction accuracy with human-written digits - sometimes spot-on, sometimes close, and occasionally way off 🥲 But I hope it meets your expectations!

Direct 28x28 Input

Draw directly at the CNN's native 28x28 resolution - the same size as MNIST training images.

28×28

Native Resolution Predictions

Draw a digit and click Predict

LeNet CNN Architecture

Input
28×28×1
Input
Conv2D
6@24×24
Conv1
ReLU
ReLU1
MaxPool
6@12×12
Pool1
Conv2D
16@8×8
Conv2
ReLU
ReLU2
MaxPool
16@4×4
Pool2
FC
256→120
FC1
ReLU
ReLU3
FC
120→84
FC2
ReLU
ReLU4
FC
84→10
Output