LSTM broken output
See original GitHub issueWhat is wrong?
Running a value against the network gives some strange outputs
Where does it happen?
In brain.recurrent.LSTM
on my Surface, latest version of Windows, x64
How do we replicate the issue?
- Run this code in brain.js:
const brain = require('brain.js');
const net = new brain.recurrent.LSTM();
const trainingData = [
{
input: 'Hello',
output: 'Hi'
},
{
input: 'Hi',
output: 'Hello'
},
{
input: 'Greetings!',
output: 'Hello'
},
{
input: 'Hello',
output: 'Greetings!'
},
{
input: 'Hi, How is it going?',
output: 'Good'
},
{
input: 'Hi, How is it going?',
output: 'Fine'
},
{
input: 'Hi, How is it going?',
output: 'Okay'
},
{
input: 'Hi, How is it going?',
output: 'Great'
},
{
input: 'Hi, How is it going?',
output: 'Could be better.'
},
{
input: 'Hi, How is it going?',
output: 'Not so great.'
}
];
net.train(trainingData, {
log: true,
logPeriod: 100,
learningRate: 0.3,
iterations: 2000
});
const output = net.run('hi');
console.log(output);
How important is this (1-5)?
5
Expected behavior (i.e. solution)
I should have gotten this response (or something simillar):
"Hello"
Other Comments
Instead of “Hello”, I got NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Bad output from keras LSTM generating a simple sequence
I'm trying to implement an LSTM layer with keras and test it on a very simple dataset. Here is my code. X =...
Read more >LSTM Output Structure - Cross Validated - Stack Exchange
First of all, tf.nn.static_rnn documentation states: Returns: A pair (outputs, state) where: outputs is a length T list of outputs (one for ...
Read more >LSTM is broken · Issue #157 · apple/tensorflow_macos - GitHub
after upgrade to alpha 2 version i get wrong results from LSTM module. Please check it.
Read more >Difference Between Return Sequences and Return States for ...
Running the example returns a sequence of 3 values, one hidden state output for each input time step for the single LSTM cell...
Read more >LSTM with trainer.compute_single_action broken again - Ray.io
LSTM with trainer.compute_single_action broken again ... True } } ) # Train for n iterations and report results (mean episode rewards).
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
👍 Looking into this now, fyi.
The only fix I found for it is to create a set of key-value pairs like this:
Where 0 corresponds to “Great” after getting the output of the network.