Skip to content

Neural networks experiments with JavaScript. Allow the use of Sigmoid, Softplus, and Hyperbolic Tangent neurons.

License

Notifications You must be signed in to change notification settings

Tom-L-M/Neural-Network

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Neural-Network-JS

This is a simple implementation of a neural network in JavaScript. Implements 3 types of Neurons: Sigmoid, SoftPlus, and Hyperbolic Tangent (TANH).

The ./src/datasets.js file includes some very very simple datasets for training a sigmoid-based neural network for predicting logic gates.

Usage:

const { SigmoidNeuralNetwork } = require('./network');
const { XORdataset } = require('./datasets');

let N = new SigmoidNeuralNetwork(2, 3, 1);
    N.train(XORdataset, 10000);

    console.log(N.activate([0,0])); // ~0
    console.log(N.activate([0,1])); // ~1
    console.log(N.activate([1,0])); // ~1
    console.log(N.activate([1,1])); // ~0

About

Neural networks experiments with JavaScript. Allow the use of Sigmoid, Softplus, and Hyperbolic Tangent neurons.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published