[Solved]Keras import package error: import error: cannot import name ‘get_ config’

Keras import package error: cannot import name ‘get_config’

Traceback (most recent call last):
  File "siameseNet.py", line 6, in <module>
    from keras.layers import Merge
  File "/usr/local/lib/python3.6/site-packages/keras/__init__.py", line 25, in <module>
    from keras import models
  File "/usr/local/lib/python3.6/site-packages/keras/models.py", line 19, in <module>
    from keras import backend
  File "/usr/local/lib/python3.6/site-packages/keras/backend.py", line 39, in <module>
    from tensorflow.python.eager.context import get_config
ImportError: cannot import name 'get_config'

Solution of Keras import package error :

pip install keras == 2.1.0 --force-reinstall

Leave a Reply

Your email address will not be published. Required fields are marked *