neural-network
This is a simple implementation of a Multilayer Feedforward Neural Network written from scratch.This network will be trained and tested using the A-Z Handwritten Alphabets dataset. Specifically, given an input image (28 x 28 = 784 pixels) from the dataset, the network will be trained to classify the image into 1 of 10 classes.(Randomly sampled).
Steps to train/test
- Download train.csv from "https://drive.google.com/file/d/1ZviWz8h5Cw85d3lqIi1bOzH-nQh-HOJD/view?usp=sharing". All the data files," train.csv", "valid.csv" and "test.csv" should be in same "src" folder.
- To generate predictions using pretrained model, just run:
bash testing.sh
- To train the model from scratch, run:
bash run.sh
Files
- src/train.csv : The basic model which gets trained on the above task.
- src/run.sh : Wrapper around train.csv, has all the hyperparameters tuned to the best value.
- src/testing.sh : This will use the pretrained model and saves predictions on test data in expt_dir.
- save_dir : This contains the weights of best model trained so far.
- supported.txt : This contains list of supported features by this model.
This code achieves an accuracy of 92% on test data.