Skip to content

Commit

Permalink
fix representation problem in train.py
Browse files Browse the repository at this point in the history
  • Loading branch information
JiabinYang committed Aug 16, 2018
1 parent d17f2d2 commit ee4e218
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions 03.image_classification/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,12 @@ def load_image(file):
img = load_image(cur_dir + '/image/dog.png')

# 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):
Expand Down

0 comments on commit ee4e218

Please sign in to comment.