Skip to content

Simple Deep Neural Network implementation using pure python code and tools from SciPy ecosystem.

Notifications You must be signed in to change notification settings

0508994/py-sDNN

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

py-sDNN

This repository represents an attempt to implement a simple, configurable, deep neural network from scratch, using nothing but pure python code along with some SciPy tools. Primary resource used is Welch Labs neural networks demystified series on YouTube. This is by no means an efficient implementation, and its only purpose is learning.

Example usage

This example demonstrates usage on a iris flower data set. IrisDF is a helper class that loads and preprocesses the data using scikit-learn API.

from nn.sdnn import DNN
from nn.iris import IrisDF

df = IrisDF()                   # load dataset
N = DNN(shape=[4, 10, 6, 3])    # create a neural network with input layer size of 4, two hidden layers, and 2 output classes (one-hot encoded)

N.train(df.X_train, df.y_train) # train the network

Behaviour of the cost/loss function over the number of iterations in the oprimization process for the given example is shown on the graph bellow.

alt text

More usage examples are avaiable in the test directory of this repo, in the form of jupyter notebooks.

About

Simple Deep Neural Network implementation using pure python code and tools from SciPy ecosystem.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages