Tensorflow版本问题冲突汇总(针对于yolo3)

1.使用pycham运行voc2yolo3出现的根目录问题

错误点:                                                                   
   FileNotFoundError: [WinError 3] 系统找不到指定的路径。: './VOCdevkit/VOC2007/Annotations'
代码段:
   xmlfilepath=r"./VOCdevkit/VOC2007/Annotations"
   saveBasePath=r"./VOCdevkit/VOC2007/Annotations/main"

修改方法:将地址改为详细地址,就可运行获得对应的txt

xmlfilepath=r"D:\PycharmProjects\YOLO3\VOCdevkit\VOC2007\Annotations"
saveBasePath=r"D:\PycharmProjects\YOLO3\VOCdevkit\VOC2007\ImageSets\Main"

2.module 'tensorflow' has no attribute 'ConfigProto'。tf2和tf1版本函数不通用

解决方法:

config = tf.ConfigProto()
增加compat.v1
config = tf.compat.v1.ConfigProto()

3.module 'tensorflow' has no attribute 'Session'.版本问题

解决方法:同上

4.AttributeError: module 'keras.backend' has no attribute 'control_flow_ops'。同为版本问题。

解决方法:https://blog.csdn.net/qq_38835585/article/details/106051940?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522163028854316780261923285%2522%252C%2522scm%2522%253A%252220140713.130102334.pc%255Fall.%2522%257D&request_id=163028854316780261923285&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2~all~first_rank_v2~rank_v29-3-106051940.pc_search_result_cache&utm_term=cannot+import+name+%27control_flow_ops%27+from+%27keras.backend.load_backend%27+&spm=1018.2226.3001.4187

以上解决方法都为在csdn搜索并使用成功的方法。

你可能感兴趣的:(tensorflow)