Reputation: 23
model = Sequential()
model.add(LSTM(5, input_shape=(1, 30)))
model.add(Dense(1))
model.compile(loss='mean_squared_error', optimizer='rmsprop')
model.fit(trainX, trainY, epochs=15, batch_size=1, verbose=2)
Can someone tell me what the 5
in LSTM(5,...)
and the 1
in Dense(1)
do?
Thanks.
Upvotes: 0
Views: 259
Reputation: 1573
Well you actually have it all in Keras' documentation
https://keras.io/layers/recurrent/
Their documentation is really intuitive and helpful, just use it.
Upvotes: 0
Reputation: 1876
Upvotes: 1
Reputation: 54
The "5" in LSTM is the dimensionality of the output space, which means:
input_shape=(1, 30)
;The "1" in Dense is the dimensionality of the output space too, which means:
Upvotes: 1