【发布时间】:2023-03-10 10:22:01
【问题描述】:
当我想在 TensorFlow 2 中使用 Keras 时,我收到了这个错误:
AttributeError: 模块 'tensorflow' 没有属性 'get_default_graph'
【问题讨论】:
-
你的tensorflow更新到最新版本了吗?您是否检查过是否调用了正确的代码文件?试试这个 - 尝试从 spyder IDE 运行这段代码。一旦遇到此错误,请检查是否调用了正确版本的 ops.py 文件。