Skip to content

KiranArun/Neural_Networks-101-demo

Repository files navigation

Neural Networks 101

This is a self-contained laboratory session, of simple examples of Neural Networks, learning to recognise handwritten digits from MNIST.

These Python based notebooks are designed to work inside Google's free research and education tool Colaboratory, which requires only a Google account. Check out their FAQ.

The human interface to the underlying Tensorflow and PyTorch machine learning frameworks is the Jupyter Notebook environment, (which opens *.ipynb files).


Types of NN's Implemented

  • 2 fully connected layers (noted as Basic_*.ipynb in filename)
  • 2 convolutional layers, 2 fully connected layers (noted as Conv_*.ipynb in filename)

The Different Frameworks Used

  • Low level Tensorflow - tensorflow_models/
  • Keras - keras_models/
  • PyTorch - pytorch_models/
  • Low level Tensorflow with Tensorboard - tb_models/
  • NumPy - numpy_models

Tutorial Notebooks

  • Basic_MNIST.ipynb is the code to create a 2 layer Neural Network in Tensorflow
  • Basic_MNIST-documentation.ipynb is the documentation and explanations corresponding to the code

Instructions for Running

1. Download or clone this repository

  • If you downloaded the ZIP, extract it on your local machine

2. Go to your Google drive, and upload this folder from your local machine

3. From Drive, open a notebook file with Colaboratory

  • Double-click some *.ipynb file, then choose Connected Apps - Colaboratory

  • If Colaboratory is not shown, you'll have to first add it from Open With, then search Colab, then connect. Choose https://colab.research.google.com

4. From Colab, select runtime, change runtime type, and set hardware accelerator to GPU

  • If it won't allocate one, that's fine (it'll just be a bit slower)

  • If you are using the GPU on the Conv_*.ipynb examples, it may well run out of GPU memory, so you'll have to change back to CPU


Contributions

Contributions are welcome, I particularly appreciate corrections from PR's or raised through Issues. Please make an individual PR for each suggestion.

Stack Overflow would be the best place for help with using the frameworks.


Licence: Apache 2.0. © 2018 Kiran Arun

About

My introductory demo for making an mnist classifier

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages