Skip to content

[Relay][Frontend][Onnx] Fix mismatch between Onnx Prelu definition and importer.#7208

Merged
masahi merged 1 commit into
apache:mainfrom
jwfromm:onnx_prelu_fix
Jan 5, 2021
Merged

[Relay][Frontend][Onnx] Fix mismatch between Onnx Prelu definition and importer.#7208
masahi merged 1 commit into
apache:mainfrom
jwfromm:onnx_prelu_fix

Conversation

@jwfromm

@jwfromm jwfromm commented Jan 5, 2021

Copy link
Copy Markdown
Contributor

Our current prelu converter assumes that incoming data is in NCHW format and that the slope will have C total elements. Neither of these are actual requirements for ONNX PreLu. As pointed out in #7202, our converter fails in other cases. This PR makes our importer prelu compliant with the onnx spec.

@jwfromm

jwfromm commented Jan 5, 2021

Copy link
Copy Markdown
Contributor Author

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

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

LGTM. Thanks!

@luyaor

luyaor commented Jan 5, 2021

Copy link
Copy Markdown
Contributor

Hi @jwfromm @mbrookhart , thanks for the response and effort on this case. The PR looks good to me.

I am currently working on a research project related to TVM, would like to make more contributions to TVM and also looking forward to the feedback from community.

@jwfromm

jwfromm commented Jan 5, 2021

Copy link
Copy Markdown
Contributor Author

These two errors that you generated were excellent real bugs with the importer and were very easy to understand and replicate with your post. If they're being auto-generated they look excellent!

@masahi

masahi commented Jan 5, 2021

Copy link
Copy Markdown
Member

Hi @luyaor you are welcome to poke at pytorch frontend too, I hope it is more robust than onnx frontend :)

@masahi masahi merged commit 1812060 into apache:main Jan 5, 2021
tkonolige pushed a commit to tkonolige/incubator-tvm that referenced this pull request Jan 11, 2021
masahi pushed a commit to masahi/tvm that referenced this pull request Jan 14, 2021
TusharKanekiDey pushed a commit to TusharKanekiDey/tvm that referenced this pull request Jan 20, 2021
trevor-m pushed a commit to neo-ai/tvm that referenced this pull request Jan 21, 2021
electriclilies pushed a commit to electriclilies/tvm that referenced this pull request Feb 18, 2021
@jwfromm jwfromm deleted the onnx_prelu_fix 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.

4 participants