雑多な技術系メモ

自分用のメモ。内容は保証しません。よろしくお願いします。

he shape of the input to "Flatten" is not fully defined (got (512, 1, 0). Make sure to pass a complete "input_shape" or "batch_input_shape" argument to the first layer in your model.

kerasでのエラーの対処法

問題

Flattenでうまくいかなく、以下のようなエラーをはいた

the shape of the input to "Flatten" is not fully defined (got (512, 1, 0). Make sure to pass a complete "input_shape" or "batch_input_shape" argument to the first layer in your model.

対処法

バックエンドをtheanoからtensorflowに変更したら解決した

原因はよくわからなかった。