提交 ee4e2188 编写于 作者: J JiabinYang

fix representation problem in train.py

上级 d17f2d2a
...@@ -116,9 +116,12 @@ def infer(use_cuda, inference_program, params_dirname=None): ...@@ -116,9 +116,12 @@ def infer(use_cuda, inference_program, params_dirname=None):
img = load_image(cur_dir + '/image/dog.png') img = load_image(cur_dir + '/image/dog.png')
# inference # inference
results = inferencer.infer({'pixel': img})
print("infer results: ", results) label_list = [
"airplane", "automobile", "bird", "cat", "deer", "dog", "frog", "horse",
"ship", "truck"
]
print("infer results: %s" % label_list[np.argmax(results[0])])
def main(use_cuda): def main(use_cuda):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册