Skip to content

[ONNX] [Relay] Resize Opset 13 - #9265

Merged
masahi merged 4 commits into
apache:mainfrom
CircleSpin:resize
Oct 14, 2021
Merged

[ONNX] [Relay] Resize Opset 13#9265
masahi merged 4 commits into
apache:mainfrom
CircleSpin:resize

Conversation

@CircleSpin

Copy link
Copy Markdown
Contributor

@AndrewZhaoLuo AndrewZhaoLuo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

]
input_names = ["X", "roi", "scales"]

# if scales == []:

Copy link
Copy Markdown
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.

@mbrookhart mbrookhart left a comment

Copy link
Copy Markdown
Contributor

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

Copy link
Copy Markdown

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
Copy Markdown
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. :)

Comment thread python/tvm/relay/frontend/onnx.py Outdated
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

Copy link
Copy Markdown

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

Copy link
Copy Markdown

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
Copy Markdown
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."

Copy link
Copy Markdown

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

5 participants