未验证 提交 2daecd4b 编写于 作者: J Jiabin Yang 提交者: GitHub

Merge pull request #594 from JiabinYang/book03_refine

fix representation problem in train.py
......@@ -118,7 +118,11 @@ def infer(use_cuda, inference_program, params_dirname=None):
# 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):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册