1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Input * of layer conv2d_* is incompatible with the layer: expected axis -3 of input shape to have value * but received input with shape [None,*,* ,*]のエラーについて

Posted at

エラーについて

Input * of layer conv2d_* is incompatible with the layer: expected axis -3 of input shape to have value * but received input with shape [None, *, *, *]

convレイヤーを使う際にNCHWとNHWCの差によって生まれるエラー。
「*」の値はmodelの設定によって変わる。

解決法

https://keras.io/ja/backend/
こちらにあるように.keras直下にあるkeras.jsonをエラーに合うように変更する。

  • NCHWにするならchannels_first
  • NWHCにするならchannels_last

バッチ、チャンネル、高さ、幅の並び順の問題は最初にぶつかる壁な気がします。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?