Skip to content

Commit

Permalink
generalizing to vision models
Browse files Browse the repository at this point in the history
  • Loading branch information
tmoreau89 committed Aug 15, 2019
1 parent ae7fbd8 commit 278ab7c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 300 deletions.
293 changes: 0 additions & 293 deletions vta/tutorials/frontend/deploy_resnet_on_vta.py

This file was deleted.

14 changes: 7 additions & 7 deletions vta/tutorials/frontend/deploy_vision_on_vta.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
# specific language governing permissions and limitations
# under the License.
"""
Deploy Pretrained ResNet Model from MxNet on VTA
Deploy Pretrained Vision Model from MxNet on VTA
================================================
**Author**: `Thierry Moreau <https://homes.cs.washington.edu/~moreau/>`_
This tutorial provides an end-to-end demo, on how to run ResNet-18 inference
onto the VTA accelerator design to perform ImageNet classification tasks.
This tutorial provides an end-to-end demo, on how to run ImageNet classification
inference onto the VTA accelerator design to perform ImageNet classification tasks.
It showcases Relay as a front end compiler that can perform quantization (VTA
only supports int8/32 inference) as well as graph packing (in order to enable
tensorization in the core) to massage the compute graph for the hardware target.
Expand Down Expand Up @@ -141,7 +141,7 @@
######################################################################
# Build the inference graph runtime
# ---------------------------------
# Grab ResNet-18 model from Gluon model zoo and compile with Relay.
# Grab vision model from Gluon model zoo and compile with Relay.
# The compilation steps are:
# 1) Front end translation from MxNet into Relay module.
# 2) Apply 8-bit quantization: here we skip the first conv layer,
Expand All @@ -156,7 +156,7 @@
# Load pre-configured AutoTVM schedules
with autotvm.tophub.context(target):

# Populate the shape and data type dictionary for ResNet input
# Populate the shape and data type dictionary for ImageNet classifier input
dtype_dict = {"data": 'float32'}
shape_dict = {"data": (env.BATCH, 3, 224, 224)}

Expand Down Expand Up @@ -215,8 +215,8 @@
m = graph_runtime.create(graph, lib, ctx)

######################################################################
# Perform ResNet-18 inference
# ---------------------------
# Perform image classification inference
# --------------------------------------
# We run classification on an image sample from ImageNet
# We just need to download the categories files, `synset.txt`
# and an input test image.
Expand Down

0 comments on commit 278ab7c

Please sign in to comment.