This repository showcases a deep learning project implementing the LeNet-5 architecture [1]. The project utilizes the MNIST dataset to demonstrate LeNet-5's effectiveness in image classification.
- Clone the repository:
git clone https//github.com/Alessio1599/LeNet-5-MNIST-Classification.git cd LeNet-5-MNIST-Classification
- Install required packages:
pip install -r requirements.txt
- Run the main script:
Example of the use of flags
cd code python main.py
python main_wandb.py --epochs=10 --batch_size=250
LeNet-5-MNIST-Classification/
├── LICENSE
├── LeNet5-MNIST.ipynb
├── README.md
├── code
│ ├── main.py
│ ├── main_wandb.py
│ └── util.py
└── requirements.txt
The project uses the MNIST dataset, which is automatically downloaded when running the scripts or notebooks.
The model is built using the LeNet-5 architecture, which consists of:
- Convolutional layers
- Average pooling layers
- Fully connected layers
The utility functions help in visualizing the training process and evaluating the model performance:
plot_history(history, metric)
: Plots the training and validation loss and metrics.show_confusion_matrix(conf_matrix, class_names)
: Displays the confusion matrix with class labels.Image_inspection(data)
: Displays 10 random images from the dataset.
[1] Y. LeCun, L. Bottou, Y. Bengio, and P. Haffner. "Gradient-based learning applied to document recognition." Proceedings of the IEEE, 86(11):2278-2324, November 1998