AttributeError: module 'tensorflow' has no attribute 'app'
Which Tensorflow version, are you using? If it is TF2.0 then you need to replace tf.app.flags
with tf.compat.v1.flags
defined here since it is no longer supported.
use absl if you don't want to downgrade tf.
from absl import appif __name__ == '__main__': app.run(main)