修改keras配置文件,可以更改keras后端依赖的框架:
sudo gedit ~/.keras/keras.json
{
"epsilon": 1e-07,
"floatx": "float32",
"image_data_format":"channels_last" ,
"backend": "tensorflow",
"image_dim_ordering":"th"
}
把tensorflow改为theano,
同时把channels_last改为channels_first,
即可切换后端框架,如下:
{
"image_data_format": "channels_first",
"epsilon": 1e-07,
"backend": "theano",
"floatx": "float32"
"image_dim_ordering":"th"
}
来源:CSDN
作者:Hinton-wu
链接:https://blog.csdn.net/qq_38410428/article/details/88998506