tensorflow2.0解决AttributeError: module ‘tensorflow’ has no attribute ‘flags’
操作
tf.flags.DEFINE_integer("width", 640, "Screen width")
报错信息
AttributeError: module 'tensorflow' has no attribute 'flags'
解决办法
import tensorflow.compat.v1 as tf
tf.disable_v2_behavior()
tensorflow2.0不兼容tensorflow1.0