keras导入包报错ImportError: cannot import name ‘get_config‘
ImportError: cannot import name ‘get_config’Traceback (most recent call last):File "siameseNet.py", line 6, in <module>from keras.layers import MergeFile "/usr/local/lib/python3.6/site-packages/
·
ImportError: 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'
解决方法:
pip install keras == 2.1.0 --force-reinstall
更多推荐
所有评论(0)