ERROR! Session/line number was not unique in database. History logging moved to new session 178

原来的代码:

MODEL_NAME = 'ssd_mobilenet_v1_coco_2017_11_17'
#载入训练好的pb模型
detection_graph = tf.Graph()
with detection_graph.as_default():
    od_graph_def = tf.GraphDef()
    with tf.gfile.GFile(PATH_TO_FROZEN_GRAPH, 'rb') as fid:
        serialized_graph = fid.read()
        od_graph_def.ParseFromString(serialized_graph)
        tf.import_graph_def(od_graph_def, name='')

执行后就会有标题所示的错误,后来检查到当前工作目录不存在object_detection/ssd_mobilenet_v1_coco_2017_11_17这个文件。

于是改成

MODEL_NAME = 'object_detection/ssd_mobilenet_v1_coco_2017_11_17'

错误解除。

你可能感兴趣的:(一般问题)