-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
What is stop-inputstart-output? #210
Comments
Please try this: var net = new brain.recurrent.LSTM();
net.train([
{ input: 'I feel great about the world!', output: {happy: 1} },
{ input: 'The world is a terrible place!', output: {sad: 1} },
]);
var output = net.run('I feel great about'); // sample log: {happy: 0.75, sad: 0.25} |
Using your exact code I'm getting "he world!stop-inputstart-output", really odd |
Please check this: https://jsfiddle.net/mubaidr/1jwdgukf/1/ For details please refer to these discussions too: |
The example that came up here as a possible fix is one we are working towards, ie: words in, decimal out. It doesn't yet work. The issue you are receiving which are the artifact of It isn't perfect, and you've identified a bug that will need resolved. However, I am working on v2 which will give us some more robust tools for these scenarios. In your specific case where training is as follows: var net = new brain.recurrent.LSTM();
net.train([
{ input: 'I feel great about the world!', output: 'happy' },
{ input: 'The world is a terrible place!', output: 'sad' },
]); And running the net as: var output = net.run('I feel great about'); The net is guessing
You are right, it is clutter, and we can do a better job of ensuring it doesn't come out of the net, I may be able to dedicate some time to fixing this in the next few days. The good news: The net is getting easier and easier to configure for situations like this in v2, including word to vector and translations. |
If you do, however, just run the net with the inputs you trained it with, you'll get: net.run('I feel great about the world!'); // -> 'happy'
net.run('The world is a terrible place!'); // -> 'sad' |
Alright, thank you for your extensive response! Obviously if you run the same input you get the same output, but the most interesting part of neural nets is when they come up with new things based on older inputs. Then again, I don't know much about LSTM and I might settle with a simple feedforward NN for now. |
What is wrong?
Output of my LSTM sometimes contains keywords stop-input and start-output.
I would expect if I ask it to run on my input that it just gives the expected output.
For instance, I expect:
To output "happy" or "sad", but instead it outputs "he world is a terrible place!stop-inputstart-outputsad"
What is up with this output 'clutter' and why is it there? It's odd that I'd have to do string splitting to get the actual output.
The text was updated successfully, but these errors were encountered: