Skip to content

Yet another pytorch implementation of MNIST handwritten digit classification

License

Notifications You must be signed in to change notification settings

pkarakal/neural-networks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Multi-Layer Perceptron, MNIST

This is yet another implementation for the classification of the MNIST handwritten digit dataset. It is implemented as part of a homework exercise for [NDM-07-05] Neural Networks - Deep Learning course of CS Department, AUTh

Getting Started

Prerequisites

  1. Python (3.6 or higher, preferably 3.9)
  2. venv

To install them on variant Linux distributions follow the instructions below

Fedora

$ sudo dnf upgrade --refresh # updates installed packages and repositories metadata
$ sudo dnf install python python3-pip python3-virtualenv python3-devel

Ubuntu

$ sudo apt update && sudo apt upgrade # updates installed packages and repositories metadata
$ sudo apt install python3 python3-pip python3.9-venv python3.9-dev # ubuntu still offers python2 in its repositories

Running the application

  1. Create and activate a virtual environment
    $ python3.9 -m venv venv
    $ source venv/bin/activate
  2. Install necessary python dependencies
    $ pip install -r requirements.txt
  3. Run the application
    $ python3 -m nn
  4. To run the knn module, just run
    $ python3 -m knn
  5. (Optionally) You can also define some cli parameters to control the batch size, the number of epochs or whether to save the model to file. To do so, you can run the application like so
    $ python3 -m nn --batch-size=N --epochs=M --save-model
  6. (Optionally) You can also create a yaml file with the aforementioned parameters and just run the application like
    $ python3 -m nn -f <file_name>.yaml

Releases

No releases published

Packages

No packages published

Languages