You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by gr...@apache.org on 2022/04/18 13:19:39 UTC
[tvm] branch main updated: Fix typo in tutorial doc (#10974)
This is an automated email from the ASF dual-hosted git repository.
gromero pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tvm.git
The following commit(s) were added to refs/heads/main by this push:
new 240fac437c Fix typo in tutorial doc (#10974)
240fac437c is described below
commit 240fac437cea40cf3aa5634b561f0f54ef837941
Author: qinduohao <al...@foxmail.com>
AuthorDate: Mon Apr 18 21:19:34 2022 +0800
Fix typo in tutorial doc (#10974)
Fix typo in the commented out code in TVMC Python tutorial.
---
gallery/tutorial/tvmc_python.py | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/gallery/tutorial/tvmc_python.py b/gallery/tutorial/tvmc_python.py
index 7ee3be0923..6efc565f0a 100644
--- a/gallery/tutorial/tvmc_python.py
+++ b/gallery/tutorial/tvmc_python.py
@@ -68,7 +68,7 @@ Let's start editing the python file in your favorite text editor.
#
# .. code-block:: python
#
-# #model = tvmc.load(my_model, shape_dict={'input1' : [1, 2, 3, 4], 'input2' : [1, 2, 3, 4]}) #Step 1: Load + shape_dict
+# #model = tvmc.load('my_model.onnx', shape_dict={'input1' : [1, 2, 3, 4], 'input2' : [1, 2, 3, 4]}) #Step 1: Load + shape_dict
#
# A suggested way to see the model's input/shape_dict is via `netron <https://netron.app/>`_. After opening the model,
# click the first node to see the name(s) and shape(s) in the inputs section.
@@ -111,7 +111,7 @@ Let's start editing the python file in your favorite text editor.
# result = tvmc.run(package, device="cpu") #Step 3: Run
#
# And you can print the results:
-# ``print(results)``
+# ``print(result)``
#
################################################################################
@@ -202,10 +202,10 @@ Let's start editing the python file in your favorite text editor.
#
# .. code-block:: python
#
-# tvmc.compile(model, target="llvm", package_path="whatever")
+# tvmc.compile(model, target="llvm", package_path="whatever") #Step 2: Compile
#
# new_package = tvmc.TVMCPackage(package_path="whatever")
-# result = tvmc.run(new_package) #Step 3: Run
+# result = tvmc.run(new_package, device="cpu") #Step 3: Run
#
#
@@ -237,7 +237,7 @@ Let's start editing the python file in your favorite text editor.
# log_file = "hello.json"
#
# # Run tuning
-# tvmc.tune(model, target="llvm",tuning_records=log_file)
+# tvmc.tune(model, target="llvm", tuning_records=log_file)
#
# ...
#
@@ -285,7 +285,7 @@ Let's start editing the python file in your favorite text editor.
# model,
# target=target, # Compilation target as string // Device to compile for
# target_host=target_host, # Host processor
-# hostname=host_ip_address, #The IP address of an RPC tracker, used when benchmarking remotely.
+# hostname=host_ip_address, # The IP address of an RPC tracker, used when benchmarking remotely.
# port=port_number, # The port of the RPC tracker to connect to. Defaults to 9090.
# rpc_key=your_key, # The RPC tracker key of the target device. Required when rpc_tracker is provided
# )