My keras.json
has backend specified to be tensorflow
and if I open Spyder and Jupyter IDE then tensorflow
is used as a backend.
Strangely if I open python
or ipython
shell within my WinPython installation, the backend defaults into theano
. Has anyone seen this behaviour before and if so what was the solution?
I have tried playing with environment variables to no effect.
I have exactly same issue. Some how after I installed shell kernel Ipython/Jupyter is pointing properly to tensor flow
import os
os.environ['KERAS_BACKEND']='tensorflow'
import keras
keras.backend.backend()
Looks like existing notebooks still say Theano. But If I create new one and enter the following then I get proper result as tensorflow import os
os.environ['KERAS_BACKEND']='tensorflow'
import keras
keras.backend.backend()
Using TensorFlow backend. Out[1]: 'tensorflow' In [ ]:
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.