Giter Club home page Giter Club logo

nnn's Introduction

Numpy Neural Network

Neural Network from scratch in Python exclusively using Numpy.

Overview

This project consists of a neural network implementation from scratch. Modules are organized in a way that intends to provide both an understandable implementation of neural networks and a user-friendly API. The project is structured as follows:

  • nnn
    • core/: Network main functionalities.
      • neural_network.py: Implementation of the neural network, including functionalities such as building a custom network and training it with backpropagation + stochastic gradient descent.
      • layers.py: Defines layers that can take part in the neural network by describing its behavior at the forward and backward steps.
      • initializers.py: Functions used to initialize network's weights.
      • activations.py: Activation functions that may be used to add nonlinearities to the model.
      • objectives.py: Functions to be optimized by adjusting network's parameters.
    • utils/: Other utilities.
      • plots.py: Module with plotting tools. It contains a function to plot the classification boundaries of a 2d classifier, among others.
      • loss_grid.py: Computation of the loss grid for a given neural network and objective function.
    • examples: Simple instructive examples. See nnn/examples/.
      • a_greater_than_b.py: Example demonstrating that a linearly separable dataset can be classified using a neural network without any hidden layer.
      • a_aprox_b.py: Example demonstrating that a non linearly separable dataset requires at least a hidden layer in order to classify samples correctly.

Prerequisites

  • Python 3.5
  • Pip 9.0.1

Note: Not tested with other python versions.

Installation

Once you have met the prerequisites, a single step is required to install this software:

  1. Run python setup.py install

This will install numpy (the only required external library to run the neural network) and matplotlib (only needed to plot classifier boundaries when running an example).

Further improvements

There are several functionalities that may be implemented to make this software more useful:

  • Other types of layers: LSTM, CNN, embeddings,...
  • Batches
  • More optimizers other than Stochastic Gradient Descent
  • More activations
  • More initializers
  • More objective functions
  • Regularization
  • Parallelization

nnn's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

bdutta19

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.