0

Team,

I wonder of anyone has found a good (for dummies :-) documentation for creating LSTM networks in Keras? Specifically about the expected size of the input, layers and output. E.g. Expected input batch shape: (batch_size, timesteps, data_dim). The Keras.io documentation isn't really clear. I'm using the Keras visualization (this is helping me).

Antonio
  • 307
  • 2
  • 11

2 Answers2

0

I have used http://machinelearningmastery.com a lot.

Some examples regarding LSTM networks:

http://machinelearningmastery.com/sequence-classification-lstm-recurrent-neural-networks-python-keras/

http://machinelearningmastery.com/understanding-stateful-lstm-recurrent-neural-networks-python-keras/

Good luck!

Wilmar van Ommeren
  • 7,469
  • 6
  • 34
  • 65
  • Hi Wilmar. Thank you for you quick reply. Dr. Jason did a good job. However, you can see there are some post clarification I made. For example, I beleive the data should be spit ramdonly instead a fixed training and validation set. Second, the results in term of equare error is terrible (+50 error, it's better to use a coin for clasification). Now, Dr. Jason's post doesn't explain the expected input/output batch shape: (batch_size, timesteps, data_dim). What if a new class is added for example? – Antonio May 15 '17 at 08:27
  • Whatever split method or ratio you use is your own choice. Low accuracy can be caused by lot's of factors. And from the tutorials you should be able to derive how the input/output shape is defined. If not, there are plenty of other examples (e.g: http://stackoverflow.com/questions/39674713/neural-network-lstm-input-shape-from-dataframe and http://danielhnyk.cz/predicting-sequences-vectors-keras-using-rnn-lstm/). Some are a bit cryptic but with a little effort you will understand the explanations. – Wilmar van Ommeren May 15 '17 at 09:22
  • Just fund a post that helped me to resolved the issued http://stackoverflow.com/questions/39674713/neural-network-lstm-input-shape-from-dataframe – Antonio May 16 '17 at 11:56
-1

Basically, a good way to understand the batch size, clases, timesteps and data dim using pandas DataFrames is available in the following question

Community
  • 1
  • 1
Antonio
  • 307
  • 2
  • 11