Neural Network JavaScript library for Coding Train tutorials
Clone or download
Versatilus Merge pull request #121 from michezio/patch-1
modified constructor args to be self documenting
Latest commit e961042 Jun 6, 2018

Toy-Neural-Network-JS Build Status

Neural Network JavaScript library for Coding Train tutorials

Examples / Demos

Here are some demos running directly in the browser:

To-Do List

  • Redo gradient descent video about
  • Delta weight formulas, connect to "mathematics of gradient" video
  • Implement gradient descent in library / with code
  • XOR coding challenge live example
  • MNIST coding challenge live example
    • redo this challenge
    • cover softmax activation, cross-entropy
    • graph cost function?
    • only use testing data
  • Support for saving / restoring network (see #50)
  • Support for different activation functions (see #45, #62)
  • Support for multiple hidden layers (see #61)
  • Support for neuro-evolution
    • play flappy bird (many players at once).
    • play pong (many game simulations at once)
    • steering sensors (a la Jabril's forrest project!)
  • Combine with ml5 / deeplearnjs

Getting Started

If you're looking for the original source code to match the videos visit this repo


You need to have the following installed:

  1. Nodejs
  2. NPM
  3. Install the NodeJS dependencies via the following command:
npm install


This Project doesn't require any additional Installing steps


  • NeuralNetwork - The neural network class
    • predict(input_array) - Returns the output of a neural network
    • train(input_array, target_array) - Trains a neural network

Running the tests

The Tests can either be checked via the automaticly running CircleCI Tests or you can also run npm test on your PC after you have done the Step "Prerequisites"

Built With

  • Nodejs - The code language used
  • CircleCI - Automated Test Service
  • Jest - Testing Framework used


Please send PullRequests. These need to pass a automated Test first and after it will get reviewed and on that review either denied or accepted.

Libraries built by the community

Here are some libraries with the same or similar functionality to this one built by the community:

Feel free to add your own libraries.


We use SemVer for versioning. For the versions available, see the tags on this repository.


See also the list of contributors who participated in this project.


This project is licensed under the terms of the MIT license, see LICENSE.