在SSD-Tensorflow-master测试时报错 1
这里是tensorflow的新版本(我的是tensorflow-gpu–1.14.0)问题
SSD-Tensorflow-master/tf_extended/metrics.py里的51行
将_create_local函数中的
return variables.Variable()
修改为:
return variables.VariableV1()
错误2: _variable_v2_call() got an unexpected keyword argument ‘collections’
解决方法为:
先 在SSD-Tensorflow-master/eval_ssd_network.py文件中添加下面一个函数:
def flatten(x):
result = []
for el in x:
if isinstance(el, tuple):
result.extend(flatten(el))
else:
result.append(el)
return result
然后 修改两行代码 318 行和 337 行的
eval_op=list(names_to_updates.values())
同时改为
eval_op=flatten(list(names_to_updates.values()))
注意,一共两行