Skip to content

Implementing linear SVM and constructing a CNN using PyTorch to achieve hand-written digit recognition.

Notifications You must be signed in to change notification settings

omikader/mnist-handwritten-digits

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mnist-handwritten-digits

Implement linear SVM and construct a CNN based on LeNet-5 using PyTorch to achieve hand-written digit recognition.

Introduction

For a formal definition of the assignment, please see the project description. For a summary of the results, please see my final report.

How to Run the Code

Create a new virtual Python3 environment so as to not affect any other projects or programs and install the binaries listed in requirements.txt using pip.

There are three scripts in the src directory. Each script is meant to be run in its entirety from the command line as such.

(venv) wireless-10-105-16-100:src omar$ python svm.py
  • svm.py - Linear SVM classifier
  • svm_lda.py - Linear SVM classifier after reducing the dataset to 9 dimensions using LDA
  • deep_learning.py - Convolutional neural network based on LeNet-5

The deep learning script allows the additional usage of several command line arguments. These include batch size and learning rate, for example. Defaults are set for all parameters in the event that none are explicitly provided.

About

Implementing linear SVM and constructing a CNN using PyTorch to achieve hand-written digit recognition.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages