From 77450190af8cec441d541a21fc928f58391416aa Mon Sep 17 00:00:00 2001 From: littletomatodonkey Date: Sun, 26 Apr 2020 05:49:49 +0000 Subject: [PATCH] fix pyinfer --- tools/infer/py_infer.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/infer/py_infer.py b/tools/infer/py_infer.py index b566092b..8236bc6f 100644 --- a/tools/infer/py_infer.py +++ b/tools/infer/py_infer.py @@ -87,6 +87,7 @@ def main(): exe, program, feed_names, fetch_lists = create_predictor(args) data = preprocess(args.image_file, operators) + data = np.expand_dims(data, axis=0) outputs = exe.run(program, feed={feed_names[0]: data}, fetch_list=fetch_lists, -- GitLab