How to run this project
Author: onmyway133Created May 22, 2017Updated Jul 19, 2017
So I try to run this project, here is the steps I take, not sure if it is correct
yarn installWhen it asks
Couldn't find any versions for "esprima-six" that matches "0.0.3"
? Please choose a version from this list: (Use arrow keys)Choose 1.0.1
Then, create a file like basic.js
var assert = require("assert"),
brain = require("./lib/brain");
var net = new brain.NeuralNetwork();
net.train([{input: { r: 0.03, g: 0.7, b: 0.5 }, output: { black: 1 }},
{input: { r: 0.16, g: 0.09, b: 0.2 }, output: { white: 1 }},
{input: { r: 0.5, g: 0.5, b: 1.0 }, output: { white: 1 }}]);
var output = net.run({ r: 1, g: Run node basic.js to see the result. Hope it help
Source: harthur/brain