From ad26080ec9b3365225b90742ec908eae7c449950 Mon Sep 17 00:00:00 2001 From: LielinJiang <50691816+LielinJiang@users.noreply.github.com> Date: Tue, 23 Jul 2019 22:34:59 +0800 Subject: [PATCH] fix score shape bug and some typo (#2906) --- PaddleCV/Research/astar2019/score.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/PaddleCV/Research/astar2019/score.py b/PaddleCV/Research/astar2019/score.py index da50eaad..d616df67 100644 --- a/PaddleCV/Research/astar2019/score.py +++ b/PaddleCV/Research/astar2019/score.py @@ -47,7 +47,7 @@ def use_coco_api_compute_mAP(data_args, test_list, num_classes, test_reader, exe boxes = fluid.layers.data( name='boxes', shape=[-1, -1, 4], dtype='float32') scores = fluid.layers.data( - name='scores', shape=[-1, -1, num_classes], dtype='float32') + name='scores', shape=[-1, num_classes, -1], dtype='float32') pred_result = fluid.layers.multiclass_nms( bboxes=boxes, scores=scores, @@ -60,7 +60,7 @@ def use_coco_api_compute_mAP(data_args, test_list, num_classes, test_reader, exe executor.run(fluid.default_startup_program()) for batch_id, data in enumerate(test_reader()): - boxes_np, socres_np = exe.run(program=infer_program, + boxes_np, scores_np = exe.run(program=infer_program, feed={feeded_var_names[0]: feeder.feed(data)['image']}, fetch_list=target_var) @@ -68,7 +68,7 @@ def use_coco_api_compute_mAP(data_args, test_list, num_classes, test_reader, exe program=test_program, feed={ 'boxes': boxes_np, - 'scores': socres_np + 'scores': scores_np }, fetch_list=[pred_result], return_numpy=False) if batch_id % 20 == 0: -- GitLab