How does tf.app.run() work in Tensorflow translate demo?
tf.app.run()
In tensorflow/models/rnn/translate/translate.py, there is a call to tf.app.
tensorflow/models/rnn/translate/translate.py
tf.app.
2.0 Compatible Answer: If you want to use tf.app.run() in Tensorflow 2.0, we should use the command,
Tensorflow 2.0
tf.compat.v1.app.run() or you can use tf_upgrade_v2 to convert 1.x code to 2.0.
tf.compat.v1.app.run()
tf_upgrade_v2
1.x
2.0