Keras is using theano as a backend despite the .keras/keras.json file specifying tensorflow.
(conda_env) [centos@ip ~]$ cat .keras/keras.json
{
"epsilon": 1e-07,
"floatx": "float32",
"image_data_format": "channels_first",
"backend": "tensorflow"
}
Python 2.7.15 | packaged by conda-forge | (default, Nov 28 2018, 18:42:13)
[GCC 7.3.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import keras
Using Theano backend.
I have tensorflow installed and can import it without a problem. Where is keras getting the command to use theano as a backend and how can I change it?
The issue is with anaconda, which is using its own file to determine the backend. You'll need to edit that file, which should be located somewhere like /home/user/anaconda/envs/my_env/etc/conda/activate.d/keras_activate.sh
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.