Recurrent Nerve Layers in Keras

I study neural networks through Keras and would like to study my sequential data set in a repeating neural network. I read the docs and tried to understand the LSTM example .

My questions:

  • What are the timesteps that are needed for both layers?
  • How do I prepare a consistent dataset that works with Dense as input for these repeating layers?
  • What does the Embedding layer do?
+4
source share
1 answer
  • Timesteps is a pretty nasty thing about Keras. Due to the fact that the data you provide as an input to your LSTM must be a numpy array, which is necessary (at least for Keras version <= 0.3.3) in order to have a certain form of data - even with a "temporary "by measurement, you can only place sequences that have a given length as input - and if your inputs vary in length, you must use either artificial data to" fill "your sequences, or use the stateful mode ( please read carefully Give Keras documentation to understand what this approach means). Both solutions can be unpleasant - but itโ€™s worth the price of Keras so simple :) I hope they do something with version 1.0.0.

  • There are two ways to apply norecurrent layers after LSTM:

    • you can set the return_sequences argument to False - then only the last activations from each sequence will be transferred to the "static" level.
    • you can use one of the "time-distributed" layers - to get more flexibility regarding what you want to do with your data.
  • https://stats.stackexchange.com/questions/182775/what-is-an-embedding-layer-in-a-neural-network :)

0
source

All Articles