0

Suppose the input to the model is a series of vectors, each with equal length. However, the number of vectors in each input can change. I want to make an LSTM model using Keras, but if I were to write

input = keras.layers.input(dims)
img_out = keras.layers.recurrent.LSTM(16)

Then what would I put for "dims"? Thanks so much.

hyperdo
  • 417
  • 1
  • 6
  • 11

1 Answers1

0

You can fix an upper bound for dims. When the input is less than dims, you can pad the rest with zero vector.

rowel
  • 136
  • 1
  • 3