After installing TensorFlow 2, the migration tool is available from the command line. To convert a project directory, run the following command:
$ tf_upgrade_v2 --intree ./project_directory --outtree ./project_directory_updated
Here is a sample of the command's logs on an example project:
INFO line 1111:10: Renamed 'tf.placeholder' to 'tf.compat.v1.placeholder'
INFO line 1112:10: Renamed 'tf.layers.dense' to 'tf.compat.v1.layers.dense'
TensorFlow 2.0 Upgrade Script
-----------------------------
Converted 21 files
Detected 1 issues that require attention
----------------------------------------------------------------------
----------------------------------------------------------------------
File: project_directory/test_tf_converter.py
----------------------------------------------------------------------
project_directory/test_tf_converter.py:806:10: WARNING: tf.image.resize_bilinear called with align_corners argument...