Skip to content

faizan1234567/Neural-Networks-in-Numpy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Backpropagtion implementation using Numpy from scrath

Training a deep learning model involves series of step. The following step are necessary to to train a deep neural network sucessfully.

  • Model architecutre search
  • Parameters initialization
  • Forward Propagation
  • Backward Propagation
  • Parameters update
  • Hyperparameters search
  • Evaluation and improvment

Architecture

The implementation supports any kind of architecture, you can define different model architectures to check the performance. alt text

Installation

git clone https://github.com/faizan1234567/Assignments.git
cd Assignments/ML/assignment5

python3 -m venv backprop
source backprop/bin/activate #linux

./backprop/Scripts/activate #windows

python3 -m pip install --upgrade pip
pip install -r requirments.txt

Usage

python deep_learning.py -h

optional arguments:
  -h, --help            show this help message and exit
  --data DATA           dataset dir
  --lr LR               learning rate value
  --iterations ITERATIONS
                        training iterations
  --img IMG             a test image
  --label LABEL         img label if given
  --default_data        use default data for testing...

python deep_learning.py --iterations 1500 --lr 0.0075 --default_data

This code will run the training and print cost vs iteration table, like the one below alt text

And some it will plot the cost as function of iterations alt text

Model prediction

Model has been tested on a batch of imagse from the test set. Which pretty descent considering that we are not using regularization. alt text

About

implementation of multi layers perceptron in Numpy from scratch

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages