[Relay][TensorFlow] Add ResizeNearestNeighbor and CropAndResize in tf converter#3393
Merged
srkreddy1238 merged 1 commit intoapache:masterfrom Jun 25, 2019
Merged
[Relay][TensorFlow] Add ResizeNearestNeighbor and CropAndResize in tf converter#3393srkreddy1238 merged 1 commit intoapache:masterfrom
srkreddy1238 merged 1 commit intoapache:masterfrom
Conversation
Member
Author
b9734a0 to
f3609a1
Compare
| def _impl(inputs, attr, params): | ||
| # input image is a 4-D tensor of shape [batch, image_height, image_width, depth] | ||
| # boxes is a 2-D tensor of shape [num_boxes, 4], 4 is for [y1, x1, y2, x2] | ||
| boxes = params.pop(inputs[1].name_hint).asnumpy() |
Contributor
There was a problem hiding this comment.
Check if we have to infer it by any chance if not available in params ?
| crop_size = params.pop(inputs[3].name_hint).asnumpy().tolist() | ||
| method = attr['method'].decode() | ||
|
|
||
| # 1) Crop |
Contributor
There was a problem hiding this comment.
Any reason why boxes at 0 handled differently ?
Member
Author
There was a problem hiding this comment.
handled all boxes in a loop now.
| _test_forward_crop_and_resize([3, 11, 11, 3], | ||
| [[0, 0, 0.9, 0.9], [0.2, 0.2, 0.8, 0.8], [0, 0, 1, 1]], | ||
| [0, 1, 2], [3, 3]) | ||
| _test_forward_crop_and_resize([1, 16, 16, 3], [[0.2, 0.4, 0.8, 0.8]], [0], [3, 3]) |
Contributor
There was a problem hiding this comment.
Please add test case by shuffling the box indicator.
e27b043 to
de41fe0
Compare
Member
Author
|
@srkreddy1238 have incorporated your comments, take a another look please |
srkreddy1238
approved these changes
Jun 25, 2019
Contributor
srkreddy1238
left a comment
There was a problem hiding this comment.
Thanks @yongwww . LGTM.
zhiics
approved these changes
Jun 25, 2019
Contributor
wweic
pushed a commit
to wweic/tvm
that referenced
this pull request
Jun 26, 2019
wweic
pushed a commit
to neo-ai/tvm
that referenced
this pull request
Jun 27, 2019
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.
Add ResizeNearestNeighbor and CropAndResize. CropAndResize is a must for Mask-RCNN.