Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
FANN (Fast Artificial Neural Network Library) bindings for Node.js
C++ JavaScript C Python
tree: 3611715f55

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
src
tests
.gitignore
README.md
binding.gyp
index.js
package.json
test.js

README.md

node-fann

node-fann is a FANN bindings for Node.js.

FANN (Fast Artificial Neural Network Library) is a free open source neural network library, which implements multilayer artificial neural networks with support for both fully connected and sparsely connected networks.

Installation

npm install fann

You will need FANN library version >= 2.1.0.

Example

var fann = require('fann');
var net = new fann.standard(2,3,1);

var data = [
    [[0, 0], [0]],
    [[0, 1], [1]],
    [[1, 0], [1]],
    [[1, 1], [0]],
];

net.train(data, {error: 0.00001});

console.log("xor test (0,0) -> ", net.run([0, 0]));
console.log("xor test (1,0) -> ", net.run([1, 0]));
console.log("xor test (0,1) -> ", net.run([0, 1]));
console.log("xor test (1,1) -> ", net.run([1, 1]));
Something went wrong with that request. Please try again.