0

I have just installed Tensorflow and Keras in a conda environment (with miniconda).

In the keras.json file, the backend is tensorflow and there is no environment variable KERAS_BACKEND defined, however, when I import keras backend, I am told that Theano is used !

I don't know what's wrong....

GuillaumeA
  • 3,493
  • 4
  • 35
  • 69

1 Answers1

0

Two solutions in fact:

1- When installing Keras with conda install keras, the solution I found is to overwrite the __init.py__ file of the keras.backend module. In the file, I simply commented the portion of code where it checks for an environment variable. However, I have not found where the environment variable was set.

2- The proposed solution in other posts like this one is the solution to find where the environment variable is set. For this, keras has to be installed with the channel of conda-forge conda install -c conda-forge keras.

GuillaumeA
  • 3,493
  • 4
  • 35
  • 69
  • As pointed out by keras developpers, installing Keras with conda is not the recommanded way, only pip is supported – GuillaumeA Apr 24 '18 at 19:01