My input training and test dataset is the following size:
print(trainX.shape):(53394, 3)
print(testX.shape):(17799, 3)
print(trainY.shape):(53394,)
print(testY.shape):(17799,)
I reshaped it as follows:
trainX.shape:(1, 53394, 3)
testX.shape: (1, 17799, 3)
trainY.shape: (1, 53394)
testY.shape: (1, 17799)
Now, I pass it as the input layer of a LSTM:
model = Sequential()
model.add(LSTM(66, input_shape=(len(trainX),3)))
model.add(Dense(1))
model.compile(loss='mean_squared_error', optimizer='adam')
model.fit(trainX, trainY, epochs=100,batch_size=1, verbose=2)
I am getting the error:
Error Message:
ValueError: Error when checking input: expected lstm_6_input to have shape (1, 3) but got array with shape (53394, 3)
Please help me to fit my data properly into a LSTM.