Skip to content

an implementation of a neural network in plain ol' js

Notifications You must be signed in to change notification settings

gustavcorpas/neural-network

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

neural-network

an implementation of a neural network in javascript. The network, once trained is able to recognize hand written images from the MNIST database.

About the network

This neural network has two hidden layers. The activation function on all nodes are sigmoid. The training is stochastic, in that the weights and biases are updated on each training example. Options for batch and mini-batch training should be added in the future.

About the files

These are the important ones.

  • neuralnetwork.js is the main code for the neural network. This is responsible for- forward propagation and backpropagation.

  • handwrittenimage.js is drawing the pixel array of a given training example to the HTML canvas. It is also gets the correct value for the image, used when training the network.

  • mathlib.js is a home-brewed matrix library with the bare minimum for this project.

  • imageparser.js parses a specified number of images from the MNIST database into a JSON format that can be loaded in the browser, i.e. parsedImages.json.

  • main.js binds it all together.

About

an implementation of a neural network in plain ol' js

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published