What is stop-inputstart-output?
See original GitHub issueWhat 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:
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' },
]);
var output = net.run('I feel great about');
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.
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
value1.concat is not a function and Cannot read property ...
node_modules/brain.js/src/utilities/data-formatter.js:97 value1.concat(['stop-input', 'start-output']), ^. TypeError: value1.concat is not a function ...
Read more >Model 43120 | Manualzz
Model 43120 XCON Triggger System Trigger amplifier + delay generator + pulsed event timer all in one easy to use, compact unit Features:...
Read more >Untitled - Plunker
toIndexes(value1.concat(['stop-input', 'start-output']), maxThreshold); } if (value2 === null) return result; if (typeof value2 === 'string') { return ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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
stop-inputstart-output
is two fold: The way the existing neural network in v1 works, all characters are mapped to a single neuron. So when the neuron is activated, it tells that net a character entered into it. To get the net to do interesting things like predict what is next and stop, it needs certain factors, like telling the net: “stop receiving inputs, and just guess the output, then end” and that is what the above artifact is essentially.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:
And running the net as:
The net is guessing
he world is a terrible place!stop-inputstart-outputsad
and in short is linking the whole sentence as:I feel great abouthe world is a terrible place!stop-inputstart-outputsad
. If we cut out the artifact ofstop-inputstart-out
we arrive atI feel great abouthe world is a terrible place!sad
and if we jump to the end result just after the artifact we getsad
. In short I would say the net either needs more depth, more neurons, more training, or more training data, or a combination of those.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: