import tensorflow as tf flags = tf.app.flags
[AttributeError:模块'tensorflow'没有属性'app']
尝试使用:import tensorflow.compat.v1 as tf
import tensorflow.compat.v1 as tf