Skip to content

Unrecognized keyword arguments passed to LSTM: {'batch_input_shape' #20106

@Ineedsomehelpah

Description

@Ineedsomehelpah

model = Sequential()
model.add(LSTM(4, batch_input_shape=(1, X_train.shape[1], X_train.shape[2]), stateful=True))
model.add(Dense(1))
model.compile(loss='mean_squared_error', optimizer='adam')
model.fit(X_train, y_train, epochs=100, batch_size=1, verbose=1, shuffle=False)

ValueError: Unrecognized keyword arguments passed to LSTM: {'batch_input_shape': (1, 1, 7)}

My version :
TensorFlow version: 2.17.0
Keras version: 3.4.1

I've seen similar issue raised on stackoverflow. I was able to run the code 2 weeks ago without error. What new keyword argument should I use?

https://stackoverflow.com/questions/78805181/valueerror-unrecognized-keyword-arguments-passed-to-lstm-batch-input-shape

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions