How to check if Keras backend is tensorflow or theano

Viewed 386

I want to check in code what backend keras is using. Whether it is tensorflow or theano? How can I get this?

The code here uses K._BACKEND, however I'm getting an error saying that attribute not found. My Keras version is 2.2.5

1 Answers

From here, the following works

from keras import backend as K

print(K.backend())
Related