Skip to content

From-scratch CNN for use with the MNIST dataset. Two convolutional layers, two max pooling layers, one fully connected layer, and AdaGrad optimizer.

Notifications You must be signed in to change notification settings

kvfairchild/MNIST-CNN

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MNIST CNN

From-scratch CNN with two convolutional layers, two max pooling layers, one fully connected layer, and AdaGrad optimizer.

  • main.py: main file to init and run network
  • config.py: set net and training parameters (filter dimensions, learning rate, etc.)
  • MNIST_file_parser.py: parse MNIST files
  • initialize.py: initalize network (truncated normal distribution)
  • run.py: train and test network on MNIST dataset
  • network.py: CNN (feedforward & backprop)
  • optimize.py: contains AdaGrad optimizer

Typical training output:

Batch 50/500 of Epoch 1/1: Cost: 0.35, Batch: 91% accuracy, Epoch: 85% accuracy

Typical test output:

#50/10000: 7 | 7  OK
#51/10000: 8 | 3  X

To run:

./main.py

About

From-scratch CNN for use with the MNIST dataset. Two convolutional layers, two max pooling layers, one fully connected layer, and AdaGrad optimizer.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages