成功解决 AttributeError: module 'tensorflow.python.keras.backend' has no attribute 'get_graph'

在导入keras包时出现这个问题,是因为安装的tensorflow版本和keras版本不匹配,只需卸载keras,重新安装自己tensorflow对应的版本就OK了。
可以在这个网址查看tensorflow和keras对应的版本:https://docs.floydhub.com/guides/environments/

原文地址:https://www.cnblogs.com/liuwenhua/p/12015633.html