4
5

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 5 years have passed since last update.

kerasが2.0でになって次元の扱いが上手くいかない時の対処法

Posted at

前はkerasの設定ファイルをこんな感じで書いていたと思います。

~/.keras/keras.json
{
    "image_dim_ordering": "th", # th or tf
    "epsilon": 1e-07,
    "floatx": "float32",
    "backend": "theano"
}

2.0になって、 image_dim_orderingimage_data_format に変わっていました。

~/.keras/keras.json
{
    "image_data_format": "channels_first", # channels_first or channels_last
    "epsilon": 1e-07,
    "floatx": "float32",
    "backend": "theano"
}

まだDocumentationに書いてなかったので気付けなかったのですが、このようにすれば上手くうごきました。
突然動かなくなってしまったのには困りましたが、命名とかもどんどんわかりやすくなっています。keras使いやすいです。

4
5
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
4
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?