This repository contains the implementation of LeNet-5 Convolutional Neural Network (CNN) Architecture from scratch using numpy. LeNet-5 is a pioneering architecture in the field of deep learning, particularly for handwritten digit classification on the MNIST dataset, developed in the 90s by Yann LeCun.
models/
- A directory storing Pickle files for pre-trained models for inferencemodules/
- A directory comprises of the implementation of the layers, loss functions, optimizers and all other modules of the modelLeNet5_RBF_model.ipynb
- The implementation of LeNet-5 with the original RBF output layerLeNet5_softmax_model.ipynb
- The implementation of LeNet-5 with softmax output for higher prediction accuracyapp.py
- The implementation of the handwritten digit recognition app with LeNet-5 as the model using tkinter
git clone https://github.com/T0mLam/LeNet-5-from-scratch.git
cd LeNet-5-from-scratch
pip install -r requirements.txt
python -m app
Create a new file experiment.py
# Use the format 'from modules.{filename} import {module}'
# e.g. import the Adam optimizer
from modules.optimizer import Adam
...
optimizer = Adam(model, lr=0.001)
Run the script
python -m experiment
- Yann Lecun for the LeNet paper