Javascript Neural Networks

Overview


The backpropagation library provides an implementation of the backpropagation training algorithm as applied to a neural network.

Model


A neural network is just a series of layers, where the outputs of one layer becomes the inputs to the next. As such, it is simply structured as an array of layers in the backpropagation library.

The following code demonstrates building a simple two layer neural network, with a sigmoid activation function on the first layer, and a softmax activation on the second.


let ba = await import('/lib/backpropagation/v1.0.0/backpropagation.mjs');

let layers = [];
layers.push(ba.affine({
    inputs:20,
    outputs:5,
}));
layers.push(ba.sigmoid());

layers.push(ba.affine({
    inputs:5,
    outputs:9,
}));
layers.push(ba.softmax());
					

Topics


The following describes the process of creating a neural network with the backpropagation library.

  • Layers
    • Weight Layer
    • Activation Functions
  • Loss Functions
  • Applying the Network to an Input
  • Training
    • Regularization

Example Uses


  • Character Recognition Example