error: AttributeError: module 'tensorflow.python.keras.backend' has no attribute 'get_graph'

TensorFlow Keras運行錯誤:

AttributeError: module 'tensorflow.python.keras.backend' has no attribute 'get_graph'

原因:安裝的tensorflow版本和keras版本不匹配

解決方法:卸載自己的keras,然後重新安裝對應版本keras

                 查看對應版本網址:https://docs.floydhub.com/guides/environments/

我的是TensorFlow1.10.0,所以對應Keras版本是2.2.0,  指定版本安裝pip install keras==2.2.0即可

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章