Skip to content

Commit

Permalink
apache#7058 [Tutorial] Import errors in deploy_detection.py and deplo…
Browse files Browse the repository at this point in the history
…y_classification.py (apache#7059)

* Update deploy_classification.py

Changed import paths

* Update deploy_detection.py

changed import paths and stop layer id

* Update deploy_classification.py

Set working directory to TVM base.

* Update deploy_detection.py

Set working directory to TVM base. Changed layer id in comment to 186.

* reverse changes in deploy_classification.py

Reversed changes in import path. Imports working as expected.

* Reverse change in import paths

Imports working as expected.

* Update deploy_detection.py

Duplicated graph_runtime import removed.
  • Loading branch information
fprotopapa authored Dec 11, 2020
1 parent 653f697 commit 19e2631
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions vta/tutorials/frontend/legacy/deploy_detection.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
from tvm import rpc, autotvm, relay
from tvm.relay.testing import yolo_detection, darknet
from tvm.relay.testing.darknet import __darknetffi__
from tvm.contrib import graph_runtime, graph_runtime, util
from tvm.contrib import graph_runtime, utils
from tvm.contrib.download import download_testdata
from vta.testing import simulator
from vta.top import graph_pack
Expand Down Expand Up @@ -123,15 +123,15 @@
target = env.target if device == "vta" else env.target_vta_cpu

pack_dict = {
"yolov3-tiny": ["nn.max_pool2d", "cast", 4, 185],
"yolov3-tiny": ["nn.max_pool2d", "cast", 4, 186],
}

# Name of Darknet model to compile
# The ``start_pack`` and ``stop_pack`` labels indicate where
# to start and end the graph packing relay pass: in other words
# where to start and finish offloading to VTA.
# the number 4 indicate the the ``start_pack`` index is 4, the
# number 185 indicate the ``stop_pack index`` is 185, by using
# number 186 indicate the ``stop_pack index`` is 186, by using
# name and index number, here we can located to correct place
# where to start/end when there are multiple ``nn.max_pool2d``
# or ``cast``, print(mod.astext(show_meta_data=False)) can help
Expand Down

0 comments on commit 19e2631

Please sign in to comment.