Skip to content

[Tutorial] Import errors in deploy_detection.py and deploy_classification.py  #7058

Description

@fprotopapa

I ran into import errors while following the VTA tutorial for 'Deploy Pretrained Vision Model from MxNet on VTA' under Ubuntu 18.04.5 LTS and Docker images created with Dockerfile.ci_cpu. Scripts launched from tvm base directory.

File: tvm/vta/tutorials/frontend/deploy_classification.py
In line 59 to 61:
import vta
from vta.testing import simulator
from vta.top import graph_pack

Import paths have changed and function call for graph_pack in line 181.

Changed to:

       import vta
       from vta.python.vta.testing import simulator
       from vta.python.vta.top import graphpack as graph_pack
       from vta.python import vta

and in line 181

        relay_prog = graph_pack.graph_pack(

Similiar issue in file tvm/vta/tutorials/frontend/legacy/deploy_detection.py

Line 58 to 64 and function call in line 222:

       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.download import download_testdata
       from vta.testing import simulator
       from vta.top import graph_pack

Changed to:

       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, utils
       from tvm.contrib.download import download_testdata
       from vta.python.vta.testing import simulator
       from vta.python.vta.top import graphpack as graph_pack
       from vta.python import vta

and

        mod = graph_pack.graph_pack(

Also layer id for stop layer 'cast' is 186 in line 126.

#7059

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions