WARNING: All log messages before absl::InitializeLog() is called are written to STDERR
I0000 00:00:1794237314.067111 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: SSE3 SSE4.1 SSE4.2 AVX 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
Options (12)
| Option | Description | Source |
|---|
-h, --help | show this help message and exit | help |
--infile INPUT_FILE | If converting a single file, the name of the file to convert | help |
--outfile OUTPUT_FILE | If converting a single file, the output filename. | help |
--intree INPUT_TREE | If converting a whole tree of files, the directory to read from (relative or absolute). | help |
--outtree OUTPUT_TREE | If converting a whole tree of files, the output directory (relative or absolute). | help |
--copyotherfiles COPY_OTHER_FILES | If converting a whole tree of files, whether to copy the other files. | help |
--inplace | If converting a set of files, whether to allow the conversion to be performed on the input files. | help |
--no_import_rename | Not to rename import to compat.v2 explicitly. | help |
--no_upgrade_compat_v1_import | If specified, don't upgrade explicit imports of `tensorflow.compat.v1 as tf` to the v2 APIs. | help |
--reportfile REPORT_FILENAME | The name of the file where the report log is stored.(default: report.txt) | help |
--mode DEFAULT | Upgrade script mode. | help |
--print_all | Print full log to stdout instead of just printing errors | help |
Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.