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

Viewed 20
model = Sequential()
model.add(LSTM(22, input_shape=(360,1)))
model.add(Dense(22, activation='softmax'))
model.compile(loss='categorical_crossentropy', optimizer='adam', metrics=['accuracy'])
print(model.summary())
model.fit(X_res, y_res, epochs=2, batch_size=500)

I can not figure out what am I doing wrong. I am working on some one else's code where it is perfectly functioning.

0 Answers
Related