Skip to content

[ONNX] Resize op converter and add half_pixel mode to Resize op - #4536

Closed
masahi wants to merge 14 commits into
apache:masterfrom
masahi:onnx-resize
Closed

[ONNX] Resize op converter and add half_pixel mode to Resize op#4536
masahi wants to merge 14 commits into
apache:masterfrom
masahi:onnx-resize

Conversation

@masahi

@masahimasahi commented Dec 17, 2019

Copy link
Copy Markdown
Member

Implemented a working opset 11 Resize op converter with test cases validated against onnxruntime.
It needs #4538 to be merged.

I removed the "align_corners" option from resize op, and instead introduced "coordinate_transformation_mode" option, which can be

  • "asymmetric"
  • "align_corners"
  • "half_pixel"

Refer to ONNX Resize op spec for the meaning of these options.

Related discussion:
https://discuss.tvm.ai/t/relay-onnx-frontend-implement-resize-operation/5131/6

Comment threadtests/python/frontend/onnx/test_forward.py
@jwfromm

Copy link
Copy Markdown
Contributor

LGTM, nice job!

@yzhliu

Copy link
Copy Markdown
Member

should we close this one?

@masahi

Copy link
Copy Markdown
MemberAuthor

@yzhliu ok, I'll open another PR for onnx bits, when the CI is ready.

@masahimasahi closed this Jan 3, 2020
@Aeroxander

Copy link
Copy Markdown

@masahi I'm getting this error:

tvm.error.OpNotImplemented: The following operators are not supported for frontend ONNX: Resize

It's from a PyTorch 1.3 -> ONNX v4 opset version 11 model

Does it have a different type of option in the Resize operator or isn't the error handling not updated yet?

@masahi

masahi commented Jan 3, 2020

Copy link
Copy Markdown
MemberAuthor

@Aeroxander if you are using the change in this PR correctly, you shouldn't get that error. ONNX change is not merged upstream, so you need to manually add them to your repo.

@masahi
masahi deleted the onnx-resize branch February 7, 2020 12:01
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@masahi@jwfromm@yzhliu@Aeroxander