data_format |
A string, one of channels_last (default) or channels_first . The ordering of the dimensions in the inputs. channels_last corresponds to inputs with shape (batch_size, height, width, channels) while channels_first corresponds to inputs with shape (batch_size, channels,height, width) . It defaults to the image_data_format value found in your Keras config file at ~/.keras/keras.json . If you never set it, then it will be channels_last . |
这个参数在很多层里面都有,字符串类型,'channels_last
'或者'channels_first
',指定输入 层 中的数据的格式。
'channels_last
':(batch_size, height, width, channels)
'channels_first
': (batch_size, channels,height, width)
这个默认值是配置在本地的~/.keras/keras.json
. 文件中,也就是如果安装好tensorflow后就已经配置好了,如果你从来没更改过,默认就是channels_last
。
以下是我的本地keras.json的配置信息。