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] [EZ] Fix reshape bug with passing both scale and size #9512

Closed

Conversation

AndrewZhaoLuo
Copy link
Contributor

Resize can either take a scale or size parameter describing how the resize operation can be performed. Both cannot be given and we throw an error if they are. However, we assume if size is present then scale is none. This is not exhaustive as sometimes it seems that an empty sequence is also sufficient for this.

See the previous opset implementations for Resize to see this case.

Copy link
Contributor

@comaniac comaniac left a comment

Choose a reason for hiding this comment

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

Thanks for the fix. Could you check whether other frontends have this issue as well?

python/tvm/relay/frontend/onnx.py Outdated Show resolved Hide resolved
Co-authored-by: Cody Yu <comaniac0422@gmail.com>
@@ -2639,8 +2639,12 @@ def _impl_v11(cls, inputs, attr, params):
def _impl_v13(cls, inputs, attr, params):
scale = inputs[2]
size = inputs[3]
scale_type = infer_type(scale)
Copy link
Contributor

Choose a reason for hiding this comment

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

This will crash if scale is None?

@AndrewZhaoLuo
Copy link
Contributor Author

This will be subsumed by #9475

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.

3 participants