From a03a3111613e39f4a291a52c513720992db2ee71 Mon Sep 17 00:00:00 2001 From: alexqdh Date: Tue, 12 Apr 2022 17:26:35 +0800 Subject: [PATCH] fix typo in tutorial doc --- 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 7ee3be09238e..6efc565f0a39 100644 --- a/gallery/tutorial/tvmc_python.py +++ b/gallery/tutorial/tvmc_python.py @@ -68,7 +68,7 @@ # # .. 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 `_. After opening the model, # click the first node to see the name(s) and shape(s) in the inputs section. @@ -111,7 +111,7 @@ # result = tvmc.run(package, device="cpu") #Step 3: Run # # And you can print the results: -# ``print(results)`` +# ``print(result)`` # ################################################################################ @@ -202,10 +202,10 @@ # # .. 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 @@ # 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 @@ # 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 # )