Skip to content

Commit

Permalink
Fix tutorial
Browse files Browse the repository at this point in the history
  • Loading branch information
Ubuntu committed Dec 19, 2018
1 parent 4750b8f commit a7f1766
Showing 1 changed file with 5 additions and 12 deletions.
17 changes: 5 additions & 12 deletions tutorials/nnvm/deploy_ssd.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,21 +39,14 @@
# x86 conv2d schedule doesn't support dilation.

supported_model = [
'ssd_512_resnet18_v1_voc',
'ssd_512_resnet18_v1_coco',
'ssd_512_resnet18_v1_custom',
'ssd_512_resnet50_v1_voc',
'ssd_512_resnet50_v1_coco',
'ssd_512_resnet50_v1_custom',
'ssd_512_resnet101_v2_voc',
'ssd_512_resnet152_v2_voc',
'ssd_512_mobilenet1_0_voc',
'ssd_512_mobilenet1_0_coco',
'ssd_512_mobilenet1_0_custom',
'ssd_512_mobilenet1.0_voc',
'ssd_512_mobilenet1.0_coco',
]

model_name = "ssd_512_resnet50_v1_voc"
test_image = "dog.jpg"
dshape = (1, 3, 512, 512)
dtype = "float32"
target = "llvm"
Expand Down Expand Up @@ -86,12 +79,12 @@
# execute
m.run()
# get outputs
class_IDs, scores, bounding_boxs = tvm.get_output(0), tvm.get_output(1), tvm.get_output(2)
class_IDs, scores, bounding_boxs = m.get_output(0), m.get_output(1), m.get_output(2)

######################################################################
# Display result

ax = utils.viz.plot_bbox(img, bounding_boxs[0], scores[0],
class_IDs[0], class_names=block.classes)
ax = utils.viz.plot_bbox(img, bounding_boxs.asnumpy()[0], scores.asnumpy()[0],
class_IDs.asnumpy()[0], class_names=block.classes)
plt.show()

0 comments on commit a7f1766

Please sign in to comment.