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

[ONNX] [Relay] Resize Opset 13 #9265

Merged
merged 4 commits into from
Oct 14, 2021
Merged

[ONNX] [Relay] Resize Opset 13 #9265

merged 4 commits into from
Oct 14, 2021

Conversation

CircleSpin
Copy link
Contributor

Copy link
Contributor

@AndrewZhaoLuo AndrewZhaoLuo left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -3970,6 +3970,12 @@ def verify(ishape, oshape, scales, mode, coord_trans="asymmetric", alpha=0.5, ex
make_constant_node("scales", onnx.TensorProto.FLOAT, (len(scales),), scales),
]
input_names = ["X", "roi", "scales"]

# if scales == []:
Copy link
Contributor

Choose a reason for hiding this comment

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

Just remove this if you don't need it.

Copy link
Contributor

@mbrookhart mbrookhart left a comment

Choose a reason for hiding this comment

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

Remove the commented code, otherwise LGTM, thanks!

@classmethod
def v11_13_common(cls, inputs, size, attr, params):
"""
Resize v11 and Resize v13 are identical except in how

Choose a reason for hiding this comment

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

Resize v11 and resize

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi emijiayw, Thanks for your feedback! Resize v13 is specified for clarity since just resize could be misleading. :)

def v11_13_common(cls, inputs, size, attr, params):
"""
Resize v11 and Resize v13 are identical except in how
they handle passing in scale and size. This utility

Choose a reason for hiding this comment

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

they handle the passing

scale = inputs[2]
size = inputs[3]
if size is not None:
assert scale is None, "One of scale or size should be passed, not both."

Choose a reason for hiding this comment

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

One of the scales or sizes

Copy link
Contributor Author

Choose a reason for hiding this comment

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

both scale and size are singular (there is only one of them) and adding an 's' makes them plural. It's only one dog or cat, not dogs or cats 🐶 🐈 vs 🐶 🐶 🐶 🐈 🐈 🐈

), "One of scale or size should be passed, not both."
size = inputs[3]
else:
assert len(scale_shape) != 0, "One of scale or size should be passed."

Choose a reason for hiding this comment

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

One of the scales or sizes

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Same as above!

@masahi masahi merged commit 7e014a4 into apache:main Oct 14, 2021
masahi pushed a commit to Laurawly/tvm-1 that referenced this pull request Oct 14, 2021
* Fix handling of optional inputs.

* Missed one test in the ignore list.

* split 11 and 13

* removed comments, adjusted for git review

Co-authored-by: Josh Fromm <jwfromm@uw.edu>
Co-authored-by: Matthew <mbrookhart@octoml.ai>
Co-authored-by: CircleSpin <jocelyn@pop-os.localdomain>
ylc pushed a commit to ylc/tvm that referenced this pull request Jan 7, 2022
* Fix handling of optional inputs.

* Missed one test in the ignore list.

* split 11 and 13

* removed comments, adjusted for git review

Co-authored-by: Josh Fromm <jwfromm@uw.edu>
Co-authored-by: Matthew <mbrookhart@octoml.ai>
Co-authored-by: CircleSpin <jocelyn@pop-os.localdomain>
ylc pushed a commit to ylc/tvm that referenced this pull request Jan 13, 2022
* Fix handling of optional inputs.

* Missed one test in the ignore list.

* split 11 and 13

* removed comments, adjusted for git review

Co-authored-by: Josh Fromm <jwfromm@uw.edu>
Co-authored-by: Matthew <mbrookhart@octoml.ai>
Co-authored-by: CircleSpin <jocelyn@pop-os.localdomain>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants