Reference:
https://patibility/test_file_v0.11.py Line 125Renamed keyword argument from `dim` to `axis`Renamed keyword argument from `squeeze_dims` to `axis` Old: [[1, 2, 3]], dim=1), squeeze_dims=[1]).eval(), ~~~~ ~~~~~~~~~~~~~ New: [[1, 2, 3]], axis=1), axis=[1]).eval(), ~~~~~ ~~~~~
拓展阅读
tf_upgrade.py 有一些局限性:
- 它不能改变 tf.reverse() 的参数,因此必须手动修复。
- 对于参数列表重新排序的方法,如 tf.split() 和 tf.reverse_split(),它会尝试引入关键字参数,但实际上并不能重新排列参数。
有些结构必须手动替换,例如:
tf.get.variable_scope().reuse_variables()替换为:
with tf.variable_scope(tf.get.variable_scope(),reuse=True):到此这篇关于TensorFlow低版本代码自动升级为1.0版本的文章就介绍到这了,更多相关TensorFlow低版本代码自动升级 内容请搜索以前的文章或继续浏览下面的相关文章希望大家以后多多支持!