更新tensorflow版本
pip install --upgrade --ignore-installed tensorflow==x.x.x
旧版本0.x自动更新升级到2.0 https://blog.csdn.net/u012223913/article/details/79097297
tf_upgrade_v2 --infile ***.py --outfile ***_update.py
python tf_upgrade.py --intree InputDir --outtree OutputDir
tf_upgrade.py --intree InputDir --outtree OutputDir --copyotherfiles True
if __name__ == '__main__':
fileHandler = open('../report.html', mode='r', encoding='UTF-8')
report_lines = fileHandler.readlines()
for line in report_lines:
print(line.rstrip())
http://dljz.nicethemes.cn/news/show-241321.html
import tf_slim as slim
from tf_slim import losses
from tf_slim.nets import resnet_utils
from tf_slim.nets import resnet_v1
from tf_slim.nets.resnet_v1 import resnet_v1_block
问题:
tensorflow.python.framework.errors_impl.AlreadyExistsError: Another metric with the same name already exists.
AttributeError: module 'tensorflow' has no attribute 'ConfigProto'
config = tf.compat.v1.ConfigProto()
tf.compat.v1.disable_v2_behavior()
tf.compat.v1.Session()
tf.compat.v1.disable_eager_execution()
|