-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tutorial enhancement to keep it clean on docs.tvm.ai #1450
Conversation
@masahi @siju-samuel @PariksheetPinjari909 welcome to review pls. |
tutorials/nnvm/from_tensorflow.py
Outdated
# .. note:: | ||
# | ||
# tensorflow frontend import doesn't support preprocessing ops like JpegDecode | ||
# JpegDecode is a bypass (copy source) here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is bypassed
tutorials/nnvm/from_tensorflow.py
Outdated
# --------------------------------------------------- | ||
# Inference on tensorflow | ||
# ----------------------- | ||
# Now lets run the same on tensorflow |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
run the corresponding model on tensorflow
tutorials/nnvm/from_tensorflow.py
Outdated
|
||
For us to begin with, tensorflow module is required to be installed. | ||
For us to begin with, tensorflow python module is required to be installed. | ||
|
||
A quick solution is to install tensorlfow from |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tensorlfow > tensorflow
tutorials/nnvm/from_tensorflow.py
Outdated
# -------------------------------------- | ||
# Import model | ||
# ------------ | ||
# Creates tensorflow graph definition from protobuf file. | ||
|
||
with tf.gfile.FastGFile(os.path.join( | ||
"./", model_name), 'rb') as f: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
with tf.gfile.FastGFile(os.path.join("./", model_name), 'rb') as f:
keep as single line
# JpegDecode is a bypass (copy source) here. | ||
# Hence we supply decoded frame to TVM instead. | ||
# | ||
|
||
from PIL import Image | ||
image = Image.open(img_name).resize((299, 299)) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
transform_image
suggest to use _transform_image
for private functions..
@masahi & @siju-samuel thanks for the review. Handled the review comments now. |
Thanks, @srkreddy1238 @masahi @PariksheetPinjari909 @siju-samuel , this is now merged! |
Thanks for contributing to TVM! Please refer to guideline https://docs.tvm.ai/contribute/ for useful information and tips. After the pull request is submitted, please request code reviews from others in the community.