Reputation: 439
Is it possible to implement a one-to-many LSTM in Keras?
If yes, can you please provide me with a simple example?
Upvotes: 8
Views: 2531
Reputation: 40516
It's possible with a RepeatVector
layer. For example:
model = Sequential()
model.add(Dense(10, input_shape=(1))
model.add(RepeatVector(10))
model.add(LSTM(1, return_sequences=True))
Then - the input shape is (1)
and the output is (10, 1)
.
Upvotes: 7