AttributeError: module 'tensorflow' has no attribute 'get_default_graph'

此时我的tensorflow为2.0,keras为2.1.5。
网上找了不少。
此靠谱,是为借鉴:http://www.freesion.com/article/2012205875/
在此网站找到TF对应的keras版本:https://docs.floydhub.com/guides/environments/

把keras的版本:pip install keras==2.3.1
运行成功。

你可能感兴趣的:(AttributeError: module 'tensorflow' has no attribute 'get_default_graph')