WARNING: All log messages before absl::InitializeLog() is called are written to STDERR I0000 00:00:1794319960.181728 2 cpu_feature_guard.cc:227] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations. To enable the following instructions: AVX2 FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags. usage: tf_upgrade_v2 [-h] [--infile INPUT_FILE] [--outfile OUTPUT_FILE] [--intree INPUT_TREE] [--outtree OUTPUT_TREE] [--copyotherfiles COPY_OTHER_FILES] [--inplace] [--no_import_rename] [--no_upgrade_compat_v1_import] [--reportfile REPORT_FILENAME] [--mode {DEFAULT,SAFETY}] [--print_all] Convert a TensorFlow Python file from 1.x to 2.0 Simple usage: tf_upgrade_v2.py --infile foo.py --outfile bar.py tf_upgrade_v2.py --infile foo.ipynb --outfile bar.ipynb tf_upgrade_v2.py --intree ~/code/old --outtree ~/code/new options: -h, --help show this help message and exit --infile INPUT_FILE If converting a single file, the name of the file to convert --outfile OUTPUT_FILE If converting a single file, the output filename. --intree INPUT_TREE If converting a whole tree of files, the directory to read from (relative or absolute). --outtree OUTPUT_TREE If converting a whole tree of files, the output directory (relative or absolute). --copyotherfiles COPY_OTHER_FILES If converting a whole tree of files, whether to copy the other files. --inplace If converting a set of files, whether to allow the conversion to be performed on the input files. --no_import_rename Not to rename import to compat.v2 explicitly. --no_upgrade_compat_v1_import If specified, don't upgrade explicit imports of `tensorflow.compat.v1 as tf` to the v2 APIs. Otherwise, explicit imports of the form `tensorflow.compat.v1 as tf` will be upgraded. --reportfile REPORT_FILENAME The name of the file where the report log is stored.(default: report.txt) --mode {DEFAULT,SAFETY} Upgrade script mode. Supported modes: DEFAULT: Perform only straightforward conversions to upgrade to 2.0. In more difficult cases, switch to use compat.v1. SAFETY: Keep 1.* code intact and import compat.v1 module. --print_all Print full log to stdout instead of just printing errors