From 673d34a6ce2af08df091b3188a32c9107b3e14c7 Mon Sep 17 00:00:00 2001 From: HexToString <506181616@qq.com> Date: Tue, 27 Apr 2021 02:26:29 +0000 Subject: [PATCH] fix test_client bug --- .../examples/detection/ssd_vgg16_300_240e_voc/test_client.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/python/examples/detection/ssd_vgg16_300_240e_voc/test_client.py b/python/examples/detection/ssd_vgg16_300_240e_voc/test_client.py index 59024d01..490ee590 100755 --- a/python/examples/detection/ssd_vgg16_300_240e_voc/test_client.py +++ b/python/examples/detection/ssd_vgg16_300_240e_voc/test_client.py @@ -18,7 +18,7 @@ import sys import numpy as np preprocess = Sequential([ - File2Image(), BGR2RGB(), + File2Image(), BGR2RGB(), Normalize([123.675, 116.28, 103.53], [58.395, 57.12, 57.375], False), Resize((512, 512)), Transpose((2, 0, 1)) ]) @@ -33,8 +33,9 @@ im = preprocess(sys.argv[1]) fetch_map = client.predict( feed={ "image": im, + "im_shape": np.array([512, 512]), "scale_factor": np.array([1.0, 1.0]).reshape(-1), }, fetch=["save_infer_model/scale_0.tmp_1"], batch=False) -print(fetch_map) +print('ysl-----', fetch_map) -- GitLab