python-3.7 - 我该如何解决 flags=tensorflow.app.flags 错误
问题描述
import tensorflow as tf
flags = tf.app.flags
AttributeError:模块“tensorflow”没有属性“app”
解决方案
尝试使用:import tensorflow.compat.v1 as tf
推荐阅读
- tsql - 为什么这两个 SQL 日期函数没有提供相同的答案
- python-3.x - 修改给定程序以使用循环输出
- python - 我需要一种方法来循环将自定义对象添加到文件中
- angular - 将主机和 ComponentResolver 从 AngularDart 4 迁移到 5
- java - 我可以只连接一次wifi吗?
- android - 每次从其他活动开始时,如何停止创建活动?
- java - 如何使用 JUnit 5 测试调用 Instant.now() 的代码?
- android - 如何在android中添加多色ProgressBar
- inheritance - kotlin 类扩展在列表上下文中使用时解析父类的值而不是子类
- java - 需要在集成测试用例中模拟 bean