GithubHelp home page GithubHelp logo

neuralnotwork's Introduction

NeuralNotWork

A Neural Network implemented from scratch

TODO

Fix backpropagation Re-add bias Tests Add a wiki

neuralnotwork's People

Contributors

rorybyrne avatar

Watchers

 avatar  avatar

neuralnotwork's Issues

Re-implement bias

My old implementation of bias proved to be a nightmare when trying to implement backpropagation. This is partly because of what is described in #8.

Time for attempt number 2 at biases.

Network model design

We can discuss here different ways to design the model of the network itself. For example, should a layer be represented as an object, or merely a list of lists of neurons?

Right now, the Network object holds the layers as a List of tuples, where each tuple looks like this: (W, [n_0, n_1, ..., n_k]), where k is the number of neurons in the layer and W is the weight matrix for the layer.

The main problem at the moment is where to store the weights. The model described above it frustrating because individual neurons need three things to compute its output:

  • His index in his own layer - i.e. his value k
  • The index of the neuron he is currently giving his output to - its value k, which we will call j here
  • The ability to access the weight matrix for value W_kj

I am firmly against the idea of storing the weight matrix in every neuron, which means that a neuron must be able to ask its parent for the appropriate value from the weight matrix when it's computing. Any other ideas?


One way of doing this is to have a member variable inside the neuron for its own index k, its layers index in the overall network, and a network_shape variable which describes the size of each layer - i.e. [6, 3, 3]. The Neuron also has a reference to the Network, allowing it to ask the Network for the appropriate W_ij.

I'll update this as I think of other ideas.

Implement activations as layers

I spotted an implementation of activation functions as layers here. It might simplify the gradient juggling during backpropagation - each layer performs one gradient multiply and passes it on/updates.

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.