未验证 提交 bda64b5d 编写于 作者: F Feng Ni 提交者: GitHub

fix bs and voc_metrics, test=dygraph (#2195)

上级 2686dce8
......@@ -149,9 +149,9 @@ class VOCMetric(Metric):
self.detection_map.reset()
def update(self, inputs, outputs):
bboxes = outputs['bbox'].numpy()
scores = outputs['score'].numpy()
labels = outputs['label'].numpy()
bboxes = outputs['bbox'][:, 2:].numpy()
scores = outputs['bbox'][:, 1].numpy()
labels = outputs['bbox'][:, 0].numpy()
bbox_lengths = outputs['bbox_num'].numpy()
if bboxes.shape == (1, 1) or bboxes is None:
......
......@@ -110,7 +110,7 @@ class RPNHead(nn.Layer):
# TODO: Fix batch_size > 1 when testing.
if self.training:
batch_size = im_shape.shape[0]
batch_size = inputs['im_shape'].shape[0]
else:
batch_size = 1
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册