Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

empty object out of retro() #1

Open
robertleeplummerjr opened this issue Jan 25, 2017 · 3 comments
Open

empty object out of retro() #1

robertleeplummerjr opened this issue Jan 25, 2017 · 3 comments

Comments

@robertleeplummerjr
Copy link
Contributor

Started here: BrainJS/brain.js#5 (comment)

@jrobinson01
Copy link

Following up from the linked issue, input data as an array of numbers seems to break the retro() function.

var net = new brain.NeuralNetwork();

      net.train([
        {input: [0, 0], output: [0]},
        {input: [0, 1], output: [1]},
        {input: [1, 0], output: [1]},
        {input: [1, 1], output: [0]}
      ]);

      var output = net.run([1, 0]);
      console.log('out', output);// [0.933]
      console.log('retro', retro(output, net));// {2: NaN}

@robertleeplummerjr
Copy link
Contributor Author

oh nice, I see what you did there

@jrobinson01
Copy link

In addition, my real world output is more like:{isIt:1}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants