tensorflow版本支持一键转化为2.0版本

TensorFlow 2.0 includes many API changes, such as reordering arguments, renaming symbols, and changing default values for parameters. Manually performing all of these modifications would be tedious and prone to error. To streamline the changes, and to make your transition to TF 2.0 as seamless as possible, the TensorFlow team has created the tf_upgrade_v2 utility to help transition legacy code to the new API.

Note: tf_upgrade_v2 is installed automatically for TensorFlow 1.13 and later (including all TF 2.0 builds).

Typical usage is like this:

 

tf_upgrade_v2 --infile v1.*.py --outfile v2.0.py

v1.*.py为旧版本python文件

tf_upgrade_v2 \
  --intree my_project/ \
  --outtree my_project_v2/ \
  --reportfile report.txt

你可能感兴趣的:(人工智能)