У меня есть модель Keras, которая, когда я подгоняю, не удается с этой ошибкой
> kerasInput = Input(shape=(None, 47))
> LSTM(..)(kerasInput)
...
> model.fit(realInput, ...)
ValueError: Error when checking input: expected input_1 to have 3 dimensions, but got array with shape (10842, 1)
При просмотре ввода я обнаружил, что он имеет форму (10842, 1)
, но для каждой строки это фактически списоксписок.Я могу проверить с помощью
> pd.DataFrame(realInput[0]).shape
(260, 47)
Как я могу исправить свою форму ввода?
При попытке со слоем keras Reshape
создание модели завершается неудачно с помощью:
Model inputs must come from `keras.layers.Input` (thus holding past layer metadata), they cannot be the output of a previous non-Input layer. Here, a tensor specified as input to your model was not an Input tensor, it was generated by layer reshape_8.
Note that input tensors are instantiated via `tensor = keras.layers.Input(shape)`.
The tensor that caused the issue was: reshape_8/Reshape:0