报错:AttributeError: module ‘tensorflow‘ has no attribute ‘flags‘
源代码:运行程序时出现以下报错:改成flags = tf.app.flags,就报module 'tensorflow' has no attribute 'app'的错。报错原因:pycharm1.x与2.x版本问题不兼容。解决方法:FLAGS = tf.compat.v1.flags.FLAGS解决报错。这类报错基本都可以用这种方法解决。...
·
源代码:
运行程序时出现以下报错:
改成flags = tf.app.flags,就报module 'tensorflow' has no attribute 'app'的错。
报错原因:pycharm1.x与2.x版本问题不兼容。
解决方法:
FLAGS = tf.compat.v1.flags.FLAGS
解决报错。
这类报错基本都可以用这种方法解决。
更多推荐
已为社区贡献1条内容
所有评论(0)