AssertionError when trying to import backend related kernels

So, when trying to import keras, the following AssertionError appears:

    /home/m7nz/anaconda3/envs/ninja-01/lib/python3.6/site-packages/keras/backend/__init__.py in <module>()
     32     assert isinstance(_epsilon, float)
     33     _backend = _config.get('backend', _BACKEND)
---> 34     assert _backend in {'theano', 'tensorflow'}
     35     _image_data_format = _config.get('image_data_format',
     36                                      image_data_format())

AssertionError: 

      

keras.json looks like this:

{
"floatx": "float32",
"epsilon": 1e-07,
"backend": "theanos",
"image_data_format": "channels_last"

      

I tried to remove the link to tensorflow in init .py but the error persists.

This is on a Linux machine running ubuntu 16. Using Anaconda3. This is actually in anaconda environment.

Thank you for your help.

+3


source to share


1 answer


change

"backend": "theanos",

to



"backend": "theano",

      

it was just a typo in your json file :-)

+4


source







All Articles