Skip to content

Instantly share code, notes, and snippets.

@matthieu-D
Last active October 23, 2017 23:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save matthieu-D/b33f5b6b90819d22a57be8bd14f1b6b5 to your computer and use it in GitHub Desktop.
Save matthieu-D/b33f5b6b90819d22a57be8bd14f1b6b5 to your computer and use it in GitHub Desktop.
this.net.train(data, {
errorThresh: 1, // error threshold to reach
iterations: 2, // maximum training iterations
log: true, // console.log() progress periodically
logPeriod: 1, // number of iterations between logging
learningRate: 0.1 // learning rate
});
console.log(this.net.run([0,0]));
console.log(this.net.run([0,1]));
console.log(this.net.run([1,0]));
console.log(this.net.run([1,1]));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment