I would appreciate your help with creating an LSTM model in Keras. My input is a 2D numpy array with rows that are numeric time-series of equal length. I've written the following lines to create an LSTM model that operates on the raw data without an embedding layer:
lstm_clf = Sequential()
lstm_clf.add(LSTM(100, input_shape=(X_train[0], X_train[1]))
lstm_clf.add(Dense(7, activation='softmax'))
lstm_clf.compile(loss='sparse_categorical_crossentropy', optimizer='Adam', metrics=['accuracy'])
When I reach the fitting phase, I get the following error: "ValueError: Error when checking input: expected lstm_11_input to have 3 dimensions, but got array with shape (100, 289)".
Could anyone please explain to me what I'm doing wrong and how to fix the code. It must be related to the input shape, but I've no idea what it is.
Thanks a lot for your help,
Alexander.