[Frontend][Tensorflow]add batch_dim support for gatherV2#7951
Merged
comaniac merged 5 commits intoapache:mainfrom May 5, 2021
Merged
[Frontend][Tensorflow]add batch_dim support for gatherV2#7951comaniac merged 5 commits intoapache:mainfrom
comaniac merged 5 commits intoapache:mainfrom
Conversation
added 2 commits
April 30, 2021 05:31
Author
|
@comaniac @icemelon9 @yongwww @kevinthesun |
comaniac
approved these changes
Apr 30, 2021
Contributor
comaniac
left a comment
There was a problem hiding this comment.
Overall LGTM. Just nits.
Contributor
|
@zxy844288792 I notice you haven't update the gradient for take to accept batch_dims. Could you either update the gradient or add a check that batch_dims = 0 in the gradient? |
Author
I just added a check for batch_dims == 0 in the gradient |
Contributor
|
Thanks @zxy844288792 @tkonolige @yongwww |
trevor-m
pushed a commit
to trevor-m/tvm
that referenced
this pull request
May 6, 2021
* add batch_dim support * fix lint * add check for num of arguments for topi.take * fix gpu test cases * add check for batch_dims in take_grad
trevor-m
pushed a commit
to trevor-m/tvm
that referenced
this pull request
May 6, 2021
* add batch_dim support * fix lint * add check for num of arguments for topi.take * fix gpu test cases * add check for batch_dims in take_grad
trevor-m
pushed a commit
to trevor-m/tvm
that referenced
this pull request
May 6, 2021
* add batch_dim support * fix lint * add check for num of arguments for topi.take * fix gpu test cases * add check for batch_dims in take_grad
trevor-m
pushed a commit
to neo-ai/tvm
that referenced
this pull request
May 11, 2021
* add batch_dim support * fix lint * add check for num of arguments for topi.take * fix gpu test cases * add check for batch_dims in take_grad
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Encounter a special cases when batch_dims=1 in gather() from centernet_hourglass_512x512_1 from tensorflow hub model zoo.
Implement the batch_dims logic according to tensorflow implementation: https://www.tensorflow.org/api_docs/python/tf/gather
https://github.com/tensorflow/tensorflow/blob/5dcfc51118817f27fad5246812d83e5dccdc5f72/tensorflow/core/kernels/gather_op.cc
I have not added testcases for topi and relay since numpy does not have that attribute, I am open to see any suggestion for that. Test cases for tensorflow frontend parser have been added.
Thanks for contributing to TVM! Please refer to guideline https://tvm.apache.org/docs/contribute/ for useful information and tips. After the pull request is submitted, please request code reviews from Reviewers by @ them in the pull request thread.