【发布时间】:2017-11-26 04:47:28
【问题描述】:
尝试使用最近发布的 Tensorflow 对象检测 API,并且想知道如何评估他们在模型库中提供的预训练模型之一?前任。如何获得该预训练模型的 mAP 值?
由于他们提供的script 似乎使用检查点(根据他们的documentation),我尝试制作一个检查点的愚蠢副本,该副本指向他们模型动物园中提供的model.ckpt.data-00000-of-00001 模型,但是eval.py 不喜欢那样。
checkpoint
model_checkpoint_path: "model.ckpt.data-00000-of-00001"
我曾考虑过对预训练的训练进行简单的训练,然后对其进行评估......但我不确定这是否会给我正确的指标。
对不起,如果这是一个基本问题 - 我刚刚开始使用 Tensorflow,并想验证我得到了正确的东西。不胜感激!
编辑:
我按照乔纳森的回答做了一个检查点文件:
model_checkpoint_path: "model.ckpt"
all_model_checkpoint_paths: "model.ckpt"
评估脚本采用并使用 COCO 数据集进行评估。然而评估停止并说存在形状不匹配:
...
[[Node: save/Assign_19 = Assign[T=DT_FLOAT, _class=["loc:@BoxPredictor_4/ClassPredictor/weights"], use_locking=true, validate_shape=true, _device="/job:localhost/replica:0/task:0/gpu:0"](BoxPredictor_4/ClassPredictor/weights, save/RestoreV2_19/_15)]]
2017-07-05 18:40:11.969641: W tensorflow/core/framework/op_kernel.cc:1158] Invalid argument: Assign requires shapes of both tensors to match. lhs shape= [1,1,256,486] rhs shape= [1,1,256,546]
[[Node: save/Assign_19 = Assign[T=DT_FLOAT, _class=["loc:@BoxPredictor_4/ClassPredictor/weights"], use_locking=true, validate_shape=true, _device="/job:localhost/replica:0/task:0/gpu:0"](BoxPredictor_4/ClassPredictor/weights, save/RestoreV2_19/_15)]]
2017-07-05 18:40:11.969725: W tensorflow/core/framework/op_kernel.cc:1158]
...
Invalid argument: Assign requires shapes of both tensors to match. lhs shape= [1,1,256,486] rhs shape= [1,1,256,546]
tensorflow.python.framework.errors_impl.InvalidArgumentError: Assign requires shapes of both tensors to match. lhs shape= [1,1,256,486] rhs shape= [1,1,256,546]
可能是什么原因导致了这种形状不匹配?我该如何解决?
【问题讨论】:
标签: tensorflow deep-learning object-detection