leandron commented on a change in pull request #9633: URL: https://github.com/apache/tvm/pull/9633#discussion_r760895360
########## File path: gallery/how_to/use_tvms_python_api/tvmc_python.py ########## @@ -0,0 +1,236 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +""" +Getting Starting using TVMC Python, the simplified tvm API +========================================================== +**Authors**: +`Jocelyn Shiue <https://github.com/CircleSpin>`_, + +Welcome to TVMC Python +====================== +Hi! Here we explain the scripting tool designed for the complete TVM beginner. 🙂 + +################################################################################ +# Step 0: Imports +# --------------- +# +# .. code-block:: python +# +# from tvm.driver import tvmc +# + +################################################################################ +# Step 1: Load a model +# -------------------- +# Let's import our model into tvmc. +# Let's import our model into tvmc. This step converts a machine learning model from +# a supported framework into tvm's high level graph representation language called relay. +# This is to have a unified starting point for all models in tvm. The frameworks we currently +# support are: Keras, Onnx, Tensorflow, TFLite, and Pytorch. +# +# .. code-block:: python +# model = tvmc.load('my_model.onnx') #Step 1: Load Review comment: I think it would be good if we use the same model between the tvmc command line tutorial and the tvmc API tutorial. That is just a suggestion. Despite using the same or different models, I suggest pointing to a model that a user can download and use that during the tutorial. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
