How to solve incompatible layer in keras RNN_LSTM?

Viewed 15

I am trying to create an RNN model but I am struggling to resolve this error:

lstm_model = tf.keras.Sequential()
lstm_model.add(tf.keras.layers.LSTM(100, activation="relu", input_shape=(18240, 11)))
lstm_model.add(tf.keras.layers.Dense(1))
lstm_model.compile(optimizer="adam", loss="mse")
lstm_model.summary()
lstm_model.fit(X_train, y_train, epochs=100)

ValueError: Input 0 of layer sequential_2 is incompatible with the layer: expected ndim=3, found ndim=2. Full shape received: (None, 12)

0 Answers
Related