Neural Networks

Outline

  1. Neural Networks: Introduction and Forward Propagation

  2. Neutral Networks: Back Propagation

  3. Neutral Networks: Classifying Hand Written Digits

  4. Neural Networks: Batching

  5. Classifying Hand Written Digits Using Keras

Videos

  • Exclusive OR (XOR)

  • Hidden node/layer

  • Python functions

  • Matrix multiply and matrix shapes

  • Hidden error

  • One hot encoding

  • MNIST data set

  • List slicing/indexing

  • Batching

  • Batch size

Use

from tensorflow.keras.utils import to_categorical
from tensorflow.keras import optimizers

Ideas for further coding projects

  • Make a plot of the loss function as a function of epochs

  • Use the weights you find with mnist_train_small.csv to make predictions for mnist_test.csv. Is the accuracy better or worse? Why?

  • Write a digit on a piece of paper and take a photo. Use Photutils.com to crop and resize to 28x28 pixels and upload to Google Colab. Use img = cv2.imread('image.jpg',0) to convert the image to a numpy array and see if your neural network can recognise it (remember to reshape it!).