Skip to content
Advertisement

keras lstm error: expected to see 1 array

so i want to make a lstm network to run on my data but i get this message:

ValueError: Error when checking input: expected lstm_1_input to have shape (None, 1) but got array with shape (1, 557)

this is my code:

JavaScript

Advertisement

Answer

You need to change the input_shape value for LSTM layer. Also, x_train must have the following shape.

JavaScript

So, change

JavaScript

to

JavaScript
Advertisement