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

A bug about Constant in Resize #1244

Open
oaifaye opened this issue Oct 25, 2023 · 1 comment
Open

A bug about Constant in Resize #1244

oaifaye opened this issue Oct 25, 2023 · 1 comment

Comments

@oaifaye
Copy link

oaifaye commented Oct 25, 2023

Hi developer, I may have found a bug in line 25 of onnx/src/ops/resize.rs. The code is as follows:

let mut options = crate::model::optional_inputs(node).skip(2);

In onnx, the first parameter of options is the input to the image, the second is scale, and the third is sizes. Here you construct Resize to get optional_scales_input and optional_sizes_input.
You should only skip the first parameter of options, but skip both of them. This will fail to get the parameters as shown in the image below.
图片

So I think it should be changed to something like this:

let mut options = crate::model::optional_inputs(node).skip(1);
@kali
Copy link
Collaborator

kali commented Oct 25, 2023

Can you try to reproduce on tract's top of tree ? I have already refactored the Resize parsing to adapt to the various iteration of ONNX Resize spec...

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

No branches or pull requests

2 participants