Created
October 24, 2017 00:34
-
-
Save matthieu-D/d8a09b3d1c98e615955e95dcd2fd12c9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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