-
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
Fix the TF tutorial to run against TF2.0 and TF1.x #4104
Merged
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
e63e80e
WIP Run the TF tutorial on TF2
ic 6ec2b28
Remove debugger statement.
ic bbf927a
Complete the support for TF2.0's `resize`.
ic eeb8650
Support TF2.0 in the tutorial by using the compat API.
ic 63ce005
Use the TF compat API, so as to support TF2.0.
ic 2ad38bf
Partial support for EXPLICIT padding introduced in TF2.0.
ic f00982f
Merge branch 'master' into tf2
ic 3fa86a6
Guard on checking for optional TF2.0 attribute.
ic 2ebc516
Do not expect Relay to implement TF-specific attributes.
ic 5f63530
Remove unclear comment.
ic 8018983
Merge branch 'master' of github.com:dmlc/tvm into tf2
ic 92d5677
Merge branch 'master' into tf2
ic f2fca5a
Changes after review.
ic 84702fe
Fix the arguments set mistakenly.
ic 92cfcb5
Merge branch 'master' of github.com:dmlc/tvm into tf2
ic File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
it would be nice if add
half_pixel_centers
in tvm resize op. If the result is different from tensorflow, we might need to raise error instead of ignoringThere 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.
I think half_pixel_centers is the new name of align_corners (used in TF 1.X) that we do support in tvm resize.
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.
then add
transforms={'half_pixel_centers':'align_corners'}
here should be workingThere 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.
It seems the two attributes serve different purposes. The doc says nothing really. The source code does
half_pixel_centers
processing is applied optionally on top ofalign_corners
processing. E.g.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.
Idea: How about a unit test that compares a TF model using that attribute to Relay ignoring the attribute? I was reading the test suite to add to this PR, when I saw little coverage on such kind of issue, and fixing the tutorial seemed good to release early.
I'll try a test today, but if you have some guidance/advice/preference, I'd be happy to hear it. It may just be a different PR.