简体   繁体   English

如何检查 Keras 后端是 tensorflow 还是 theano

[英]How to check if Keras backend is tensorflow or theano

I want to check in code what backend keras is using.我想检查后端 keras 正在使用的代码。 Whether it is tensorflow or theano?是tensorflow还是theano? How can I get this?我怎样才能得到这个?

The code here uses K._BACKEND , however I'm getting an error saying that attribute not found. 此处的代码使用K._BACKEND ,但是我收到一条错误消息,指出找不到该属性。 My Keras version is 2.2.5我的 Keras 版本是 2.2.5

From here , the following works这里开始,以下工作

from keras import backend as K

print(K.backend())

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM