Skip to content

Iglesys347/diy-nn

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

diy-nn

Why bother with Tensorflow/Keras/Pytorch when just numpy and some math can do the job ?

This repo implements a simple Neural Network architecture for classification purpose built using only numpy.

Setup

Setup the project with the following command:

python setup.py install

Usage

Once setup is done, you can use the module as follow:

from diynn.diy_nn import DIYNN

INPUT_LAYER_SIZE = 10
HIDDEN_LAYER_SIZE = 64
OUTPUT_LAYER_SIZE = 2

nn = DIYNN(INPUT_LAYER_SIZE, HIDDEN_LAYER_SIZE, OUTPUT_LAYER_SIZE)
nn.train(X_train, y_train)

Requirements

Only numpy is required as specified in requirements.txt.

However if you want to run the examples from docs/examples/ folder, you will need to install other packages specified in doc/examples/requirements.txt.

Math explanation

The maths behind this implementation are shortly explained in docs/Partial-Math-Explanation.md.

Examples

Some examples of usage can be found in docs/examples/ folder.

About

DIY implementation of simple Neural Network

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages