The keras.json 配置文件包含以下设置:
{
"image_data_format": "channels_last",
"epsilon": 1e-07,
"floatx": "float32",
"backend": "tensorflow"
}
- image_data_format: 字符串,“channels_last” 或者 “channels_first”。它指定了 Keras 将遵循的数据格式约定。(keras.backend.image_data_format() 返回它。)
- 对于 2D 数据 (例如图像),“channels_last” 假定为 (rows, cols, channels),而 “channels_first” 假定为 (channels, rows, cols)。
- 对于 3D 数据, “channels_last” 假定为 (conv_dim1, conv_dim2, conv_dim3, channels),而 “channels_first” 假定为 (channels, conv_dim1, conv_dim2, conv_dim3)。
- epsilon: 浮点数,用于避免在某些操作中被零除的数字模糊常量。
- floatx: 字符串,“float16”, “float32”, 或 “float64”。默认浮点精度。
- backend: 字符串, “tensorflow”, “theano”, 或 “cntk”。