提交 6a6c97f9 编写于 作者: D dyning

raise exception when concatenate error

上级 dcd0ed64
...@@ -59,7 +59,13 @@ def cal_det_res(exe, config, eval_info_dict): ...@@ -59,7 +59,13 @@ def cal_det_res(exe, config, eval_info_dict):
img_list.append(data[ino][0]) img_list.append(data[ino][0])
ratio_list.append(data[ino][1]) ratio_list.append(data[ino][1])
img_name_list.append(data[ino][2]) img_name_list.append(data[ino][2])
img_list = np.concatenate(img_list, axis=0) try:
img_list = np.concatenate(img_list, axis=0)
except:
err = "concatenate error usually caused by different input image shapes.\n \
Please set \"test_batch_size_per_card\" in main yml as 1\n \
or add \"test_image_shape: [h, w]\" in reader yml for EvalReader."
raise Exception(err)
outs = exe.run(eval_info_dict['program'], \ outs = exe.run(eval_info_dict['program'], \
feed={'image': img_list}, \ feed={'image': img_list}, \
fetch_list=eval_info_dict['fetch_varname_list']) fetch_list=eval_info_dict['fetch_varname_list'])
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册