Skip to content

[Relay][Frontend][Onnx] MaxUnpool Operator#7036

Merged
masahi merged 4 commits into
apache:mainfrom
jwfromm:onnx_maxunpool
Dec 8, 2020
Merged

[Relay][Frontend][Onnx] MaxUnpool Operator#7036
masahi merged 4 commits into
apache:mainfrom
jwfromm:onnx_maxunpool

Conversation

@jwfromm

@jwfromm jwfromm commented Dec 4, 2020

Copy link
Copy Markdown
Contributor

I recently encountered a model with that uses the MaxUnpool op, a pretty interesting operator that is designed to reverse a maxpool. I've added support for it in our frontend through some sneaky use of scatter and found that it matches onnx's execution for each special case of the operator.

@jwfromm

jwfromm commented Dec 4, 2020

Copy link
Copy Markdown
Contributor Author

@masahi @mbrookhart can you guys take a look at this PR?

@jwfromm

jwfromm commented Dec 5, 2020

Copy link
Copy Markdown
Contributor Author

Whoops, I tested this with a newer version of onnxruntime that can do lenient shape merges. I'll fix the test to specify the expected output shape.

@masahi

masahi commented Dec 5, 2020

Copy link
Copy Markdown
Member

maybe it is time to upgrade ONNX and ORT on CI? We are at ONNX v1.6, while the latest is 1.8. Our ORT is hopelessly old: We are at 1.00 while the latest is 1.52.

I can take a look at CI upgrade for ONNX this month @jwfromm. I did that for PyTorch last month.

@jwfromm

jwfromm commented Dec 8, 2020

Copy link
Copy Markdown
Contributor Author

@masahi that would be nice, although in this case I was just being lazy and not calculating the output shape. I've fixed the test now if you want to take another look.

@masahi masahi left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Interesting that we can support max unpool without modifying max pooling to return indices.

@masahi masahi merged commit 7a0d10c into apache:main Dec 8, 2020
@masahi

masahi commented Dec 8, 2020

Copy link
Copy Markdown
Member

thanks @jwfromm

@jwfromm

jwfromm commented Dec 8, 2020

Copy link
Copy Markdown
Contributor Author

@masahi you're right that most models will use MaxUnpool with MaxPool returning indices, and we probably want to add that option to MaxPool operators soon.

TusharKanekiDey pushed a commit to TusharKanekiDey/tvm that referenced this pull request Jan 20, 2021
* Added maxunpool test.

* MaxUnpool implemented and tested.

* Lint fix.

* Add explicit output shape in tests.
trevor-m pushed a commit to neo-ai/tvm that referenced this pull request Jan 21, 2021
* Added maxunpool test.

* MaxUnpool implemented and tested.

* Lint fix.

* Add explicit output shape in tests.
electriclilies pushed a commit to electriclilies/tvm that referenced this pull request Feb 18, 2021
* Added maxunpool test.

* MaxUnpool implemented and tested.

* Lint fix.

* Add explicit output shape in tests.
@jwfromm jwfromm deleted the onnx_maxunpool branch April 12, 2023 15:55
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.

2 participants