Keras stateful LSTM error: Specified a list with shape [4,1] from a tensor with shape [32,1]
With this code I get an error while I try to run the prediction with X_test. The error occurs after the fitting, while y_pred = model.predict(X_test) is executed. X_train.input_shape() -> (784, 300, 7) y_train.input_shape() -> (784, 300, 1) X_test.input_shape() -> (124,300,7) y_test.input_shape() -> (124,300,1) batchsize = 4 model = Sequential() model.add(Masking(mask_value=0, batch_input_shape=(batchsize, len(X_train[0]),len(X_train[0][0])))) model.add(Bidirectional(LSTM(200, return_sequences=True,… Read More Keras stateful LSTM error: Specified a list with shape [4,1] from a tensor with shape [32,1]