DhilipSanjay / ANN-with-Momentum

Artificial Neural Networks with Back Propagation & Momentum (No external libraries used)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ANN-with-Momentum

Artificial Neural Networks with Back Propagation and Momentum (Without using keras and tensorflow)

Models

  1. Emergency Vehicle Classification - Ambulance
  2. Classify image as cat or not cat

Implementation Steps

  1. Import necessary libraries

    • numpy
    • matplotlib
    • glob
    • cv2
    • random
    • os
  2. Download and preprocess the dataset

    • Load Training and Test Datasets
    • Shuffle Training and Test Datasets
    • Resize and Normalize the images
  3. Initialize random weights and biases

    • Create dictionary to store weights and biases
    • Initialize weights and biases to zero for backpropagation
  4. Fix all hyperparameters

    • Learning rate
    • Number of epochs
    • Number of layers
    • Number of units in each layer
    • Momentum (š¯›‚)
  5. Until the termination condition is met, Do

    • For each training example, Do
      • Forward Propagation: Calculate the output of each unit and propagate through the layers.
      • Backward Propagation: Calculate the errors (for output and hidden units). Calculate the change in weights & biases. Add the momentum and update the weights & biases.

Emergency Vehicle Classification - Ambulance

Accuracy and Error - ANN without Momentum

Accuracy and Error - ANN without Momentum

Accuracy and Error - ANN with Momentum

Accuracy and Error - ANN without Momentum

Classification made by the model

Classfication made by the model


References

Note

This is a project done for Machine Learning Course (Team of 4)

About

Artificial Neural Networks with Back Propagation & Momentum (No external libraries used)


Languages

Language:Jupyter Notebook 100.0%