This repository contains code for LeNET-5 from scratch in Matlab and also using tensorflow. This was build as an assignment in my course CS698U.
-
Implement and train the LeNet-5 CNN for MNIST digit classification task
- From scratch e.g., using only Numpy, Matlab.
- Using a deep learning library; one of Caffe, Torch, Tensorflow, Keras
-
Compare your results of two implementations above with each other.
-
In the report:
- Compare the time taken by the conv layers vs. the fc layers
- Compare the number of params in the conv layers vs. the fc layers
- Visualize the features extracted from a randomly selected test example for each digit class and show t-SNE plots.
- Plot the training and validation error rates vs. the number of iterations
- Explore the effect of different batch sizes (16, 32, 64, 128) on training
-
An iteration is one mini-batch, an epoch is a pass over the whole training data
- matlab :- This folder contains implementation of Le Net 5 from strach in matlab. README.pdf contains much of the details for this implementation. Also to run this you must have matconvnet installed as for convolution this code uses convnn.m .All parameters and other driver code is present in this file. To run the code :-
MLP_configuration_driver.m
- tensorflow :- This folder contains code for LeNet -5 using tensorflow. Much of the code is taken from tensorflow without a Phd tutorials.
To run the MLP you need to run MLP_configuration_driver.m
MLP_configuration_driver.m
All plots form various tests can be found in plot folder. I have achieved accuracy of around 99.2% with this implementation.
This project is licensed under the MIT License
- Gaurav Sharma (Course Instructor CS698U)