Keras 切换后端(Theano和TensorFlow)
tensorflow
一个面向所有人的开源机器学习框架
项目地址:https://gitcode.com/gh_mirrors/te/tensorflow

·
实验室新装了keras,发现keras默认后端是tensorflow,想换回theano,看了官方文档也没搞懂,最终搞定,很简单。
中文文档的描述:keras中文文档,切换后端
其实就是在C:\Users\75538
(75538是我的windos用户名字,找你对应的用户名就行)下有个文件夹.keras
,里面有keras.json
文件,改一下里面的内容就好了,如果没有文件夹和文件,手动创建就行。
用theano的话,keras.json写入
{
"image_dim_ordering": "th",
"epsilon": 1e-07,
"floatx": "float32",
"backend": "theano"
}
用thesorflow的话,keras.json写入
{
"image_dim_ordering": "tf",
"epsilon": 1e-07,
"floatx": "float32",
"backend": "tensorflow"
}
最后保存就可以了




一个面向所有人的开源机器学习框架
最近提交(Master分支:1 个月前 )
4f64a3d5
Instead, check for this case in `ResolveUsers` and `ResolveOperand`, by querying whether the `fused_expression_root` is part of the `HloFusionAdaptor`.
This prevents us from stepping into nested fusions.
PiperOrigin-RevId: 724311958
1 个月前
aa7e952e
Fix a bug in handling negative strides, and add a test case that exposes it.
We can have negative strides that are not just -1, e.g. with a combining
reshape.
PiperOrigin-RevId: 724293790
1 个月前
更多推荐
所有评论(0)