All Projects → ludobouan → Pure Numpy Feedfowardnn

ludobouan / Pure Numpy Feedfowardnn

Simple feedforward neural network class written in pure python+numpy

Projects that are alternatives of or similar to Pure Numpy Feedfowardnn

Deep Homography Estimation Pytorch
Deep homography network with Pytorch
Stars: ✭ 49 (+0%)
Mutual labels:  jupyter-notebook
Mckinsey Smartcities Traffic Prediction
Adventure into using multi attention recurrent neural networks for time-series (city traffic) for the 2017-11-18 McKinsey IronMan (24h non-stop) prediction challenge
Stars: ✭ 49 (+0%)
Mutual labels:  jupyter-notebook
Universodiscreto
Códigos explicados nos vídeos do canal Universo Discreto (YouTube)
Stars: ✭ 49 (+0%)
Mutual labels:  jupyter-notebook
Cnn Hierarchical Network For Document Classification
This repository contains the implementation of paper "Hierarchical Attentional Hybrid Neural Networks for Document Classification"
Stars: ✭ 49 (+0%)
Mutual labels:  jupyter-notebook
Causality
A small repo in which I play with the ideas of causal modelling.
Stars: ✭ 49 (+0%)
Mutual labels:  jupyter-notebook
Eeg Classification Using Recurrent Neural Network
Used LSTM Network to classify eeg signals based on stimuli the subject recieved (visual or audio)
Stars: ✭ 49 (+0%)
Mutual labels:  jupyter-notebook
Missing Data Workshop
Matt Brems' Missing Data Workshop
Stars: ✭ 49 (+0%)
Mutual labels:  jupyter-notebook
Randomized Svd
demos for PyBay talk: Using Randomness to make code faster
Stars: ✭ 49 (+0%)
Mutual labels:  jupyter-notebook
Chinesetrafficpolicepose
Detects Chinese traffic police commanding poses 检测中国交警指挥手势
Stars: ✭ 49 (+0%)
Mutual labels:  jupyter-notebook
Spark Tutorials
Code and Notebooks for Spark Tutorials for Learning Journal @ Youtube
Stars: ✭ 49 (+0%)
Mutual labels:  jupyter-notebook
Music Generation Using Deep Learning
A Deep Learning Case Study to Generate Music Sequences using Char RNN, where each RNN is an LSTM unit.
Stars: ✭ 49 (+0%)
Mutual labels:  jupyter-notebook
Amldataprepdocs
Documentation for Microsoft Azure Machine Learning Data Preparation
Stars: ✭ 49 (+0%)
Mutual labels:  jupyter-notebook
Do Zero Ao Ml
Stars: ✭ 49 (+0%)
Mutual labels:  jupyter-notebook
Reaction Diffusion
Some Python examples to obtain reaction-diffusion results and animations.
Stars: ✭ 47 (-4.08%)
Mutual labels:  jupyter-notebook
Spotifyml
Stars: ✭ 49 (+0%)
Mutual labels:  jupyter-notebook
Whale Identification 2018
Solution to Whale Identification Challenge 2018
Stars: ✭ 49 (+0%)
Mutual labels:  jupyter-notebook
Accurate Binary Convolution Network
Binary Convolution Network for faster real-time processing in ASICs
Stars: ✭ 49 (+0%)
Mutual labels:  jupyter-notebook
Teal deer
Teal deer (from TL;DR) helps you get the gist of all the stuff you need to read, so you don't have to read it all at once.
Stars: ✭ 49 (+0%)
Mutual labels:  jupyter-notebook
Salmonte
SalmonTE is an ultra-Fast and Scalable Quantification Pipeline of Transpose Element (TE) Abundances
Stars: ✭ 49 (+0%)
Mutual labels:  jupyter-notebook
Lipreading
Stars: ✭ 49 (+0%)
Mutual labels:  jupyter-notebook

pure-numpy-feedfowardNN

Simple feedforward neural network class "handmade" in pure python+numpy
Winner of Siraj Ravel's coding challange

Characteristics

  • Fully connected feed forward neural network with as many hidden layers as needed, of any size.
  • Implements backpropagation : link 1, link 2, link 3 (does not implement gradient checking)
  • Uses gradient descent for optimization
  • Uses Sum Squared Error cost function
  • Uses the sigmoid activation function

How to use

  1. Create an instance
    nn = NeuralNetwork()
  2. Add layers
    The first input layer is created automatically
    nn.add_layer(shape=(input_dim1, output_dim1))
    nn.add_layer(shape=(input_dim2, output_dim2))
  3. Train
    nn.train(features, targets, num_epochs, learning_rate)
  4. Predict
    nn.predict(features)

The nn.train() method has an optional parameter called stop_accuracy. At the end of each epoch the mean loss is calculated and if it is under the specified threshold than the training stops. This avoids training longer than necessary. By looking at the number of epochs needed to reach the threshold, it gives us a good metric as to the performance of our hyperparameters.

Example: XOR function

The Jupyter Notebook shows how the network can be used to approximate the XOR function using a 3-layer neural network. We attempt to find the optimal network dimensions and the optimal learning rate.

Error Optimization

Dependencies

  • Numpy
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].