Dann.js

Neural Network library for Javascript

const nn = new Dann(784,10);

// Add layers
nn.addHiddenLayer(256,'leakyReLU');
nn.addHiddenLayer(128,'leakyReLU');
nn.addHiddenLayer(64,'leakyReLU');

nn.outputActivation('sigmoid');
nn.makeWeights();

// Set other values
nn.lr = 0.001;
nn.setLossFunction('bce');

// Neural Network's info
nn.log();

v2.4.1c

CDN

NODE

What is Dannjs?

Dannjs is an easy-to-use neural network library for Javascript. Since this library is small and easy to learn, it acts as a playground for experimentation with deep neural networks. It is also fast to implement which makes it a great choice for various applications.

 

Examples

Neural Network learning to count with 4bit binary digits interactive demo here.

Neural Network Solving XOR interactive demo here.

5x5 Letter recognition interactive demo here.

See a mnist trainer project on github here.

San-Francisco house prices predictions live demo here.

XOR Demo

 
const nn = new Dann(2,1);
nn.addHiddenLayer(12,'tanH');
nn.makeWeights();
nn.lr = 0.01;
 

Online Editor




Contribute

See contribution documentation here.