Skip to content
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

Merged
merged 2 commits into from
Jul 19, 2018

Conversation

srkreddy1238
Copy link
Contributor

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.

@srkreddy1238
Copy link
Contributor Author

@masahi @siju-samuel @PariksheetPinjari909 welcome to review pls.

# .. note::
#
# tensorflow frontend import doesn't support preprocessing ops like JpegDecode
# JpegDecode is a bypass (copy source) here.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is bypassed

# ---------------------------------------------------
# Inference on tensorflow
# -----------------------
# Now lets run the same on tensorflow
Copy link
Member

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


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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tensorlfow > tensorflow

# --------------------------------------
# Import model
# ------------
# Creates tensorflow graph definition from protobuf file.

with tf.gfile.FastGFile(os.path.join(
"./", model_name), 'rb') as f:
Copy link
Member

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))

Copy link
Member

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..

@srkreddy1238
Copy link
Contributor Author

@masahi & @siju-samuel thanks for the review. Handled the review comments now.

@tqchen tqchen merged commit 525eeff into apache:master Jul 19, 2018
@tqchen
Copy link
Member

tqchen commented Jul 19, 2018

Thanks, @srkreddy1238 @masahi @PariksheetPinjari909 @siju-samuel , this is now merged!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants