This repository contains a reimplementation of the classic LeNet-5 architecture described in the seminal research paper by Yann LeCun et al. This implementation is written in Python using the TensorFlow/Keras library and adheres closely to the original architecture presented in the paper.
LeNet-5 was one of the first convolutional neural networks and demonstrated the feasibility of using deep learning for handwritten digit recognition. It is a small yet powerful model designed for image classification tasks, particularly on grayscale images of size 32x32.
The architecture implemented in this repository is as follows:
- Input: Images with a shape of 28x28x1 grayscale images.
- Convolutional Layer 1: 6 filters, kernel size 5x5, activation function
tanh
. - Average Pooling Layer 1: Pool size 2x2, strides 2x2.
- Convolutional Layer 2: 16 filters, kernel size 5x5, activation function
tanh
. - Average Pooling Layer 2: Pool size 2x2, strides 2x2.
- Flatten Layer: Converts the 2D output to a 1D vector.
- Fully Connected Layer 1: 120 units, activation function
tanh
. - Fully Connected Layer 2: 84 units, activation function
tanh
. - Output Layer: 10 units (for 10 classes), activation function
softmax
.
You can expect the reimplementation to achieve similar performance to the original LeNet-5 when applied to datasets like MNIST. Results may vary depending on hyperparameters and data preprocessing.
This project is licensed under the MIT License. See the LICENSE file for details.