keras默认配置

亡梦爱人 提交于 2019-12-01 09:43:49

使用keras后,会在用户目录下生成.keras/keras.json文件,Windows下为:C:\Users\user\.keras\keras.json,Linux下为:~/.keras/keras.json

具体内容如下:

{
    "floatx": "float32",
    "epsilon": 1e-07,
    "backend": "tensorflow",
    "image_data_format": "channels_last"
}
floatx:浮点数精度
epsilon:ε的取值
backend:后端程序,可以选择为tensorflow,theano,cntk
image_data_format:指定图片数据的处理格式,取值为channels_last或者channels_first.
  channels_last:2D数据格式为(rows, cols, channels),3D数据格式为:(conv_dim1, conv_dim2, conv_dim3, channels)
  channels_first:2D数据格式为(channels, rows, cols),3D数据格式为:(channels, conv_dim1, conv_dim2, conv_dim3)
现在tensorflow已经发布了2.0版本,如果使用tensorflow做为backend,官方推荐直接使用tf.keras,以获取tensorflow更多的特性支持
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!