tract
tract copied to clipboard
A bug about Constant in Resize
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);
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...