Skip to content

Instantly share code, notes, and snippets.

@matthieu-D
Created October 24, 2017 00:34
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/d8a09b3d1c98e615955e95dcd2fd12c9 to your computer and use it in GitHub Desktop.
Save matthieu-D/d8a09b3d1c98e615955e95dcd2fd12c9 to your computer and use it in GitHub Desktop.
train() {
this.net = new brain.NeuralNetwork();
const data = [
{ input: [0, 0, 0], output:[0, 0, 0, 0, 0]},
{ input: [1, 0, 0], output:[1, 0, 0, 0, 0]},
{ input: [1, 1, 0], output:[1, 1, 0, 0, 0]},
{ input: [0, 1, 0], output:[0, 0, 1, 0, 0]},
{ input: [0, 1, 1], output:[0, 0, 0, 1, 1]},
{ input: [0, 0, 1], output:[0, 0, 0, 0, 1]}
];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment