Skip to content

Will-Wright/MNIST-CNN

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Description

This repository contains implementations of a few convolutional neural networks (CNNs) for the MNIST dataset and CIFAR-10 dataset data sets. These CNNs use PyTorch and the Keras API with TensorFlow backend. Note that TensorFlow versions >= 2.0 will throw deprecated software warnings.

The PyTorch MNIST CNN includes 2 convolutional layers, a linear layer with ReLU activation, and a linear layer with log_softmax. The model is based on this architecture and achieves an accuracy of 99.0%.

The Keras MNIST CNN includes 2 convolution layers and a flatten layer and is based on this architecture from the Keras dev team. This model achieves an accuracy of 99.2%.

The Keras CIFAR-10 CNN includes 6 convolution layers and a flatten layer and is based on this architecture by Abhijeet Kumar. This model achieves an accuracy of 89%.

CNN Architectures

MNIST with PyTorch MNIST with Keras CIFAR-10 with Keras

Demo Tutorial

  • To run the demo, call the function RunDemo.main(model_name=model_name, API=API, use_cached=use_cached).

  • model_name can take values CIFAR, MNIST, or [] (default).

  • API can take values Keras or PyTorch.

  • use_cached is boolean (default True).

Dependencies

  • torch, torchvision, torchsummary
  • graphviz, torchviz
  • keras
  • TensorFlow, CNTK, or Theano

About

Implementations of CNNs in PyTorch and Keras for the MNIST and CIFAR-10 datasets

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages