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

The backward compatibility of tract-onnx between 0.20.x and 0.21.x is broken #1312

Open
cospectrum opened this issue Jan 24, 2024 · 5 comments

Comments

@cospectrum
Copy link

The model worked in version 0.20, but in version 0.21 the parsing failed.

scrfd.onnx.zip

Error: Failed analyse for node #204 "Resize_99" Resize

Caused by:
    0: Infering facts
    1: Applying rule inputs[2].shape[0] == {(inputs[0].rank) as dim}
    2: Impossible to unify Val(0) with Val(4).
@cospectrum
Copy link
Author

The input is 1,3,640,640,f32

@kali
Copy link
Collaborator

kali commented Jan 26, 2024

Thanks for the report, I'll try to have a look

@kali
Copy link
Collaborator

kali commented Jan 27, 2024

I have merged a fix on main. Please be give it a shot. Also, be aware that tract Resize operator is weak and incomplete. It's a whole project of its own, with a lot of added complexity due to the multiple variants of its specification depending on operator sets. I just don't have the bandwidth.

@cospectrum
Copy link
Author

model.run(inputs).unwrap() failed

[.../onnx/src/ops/resize.rs:11] ctx.onnx_operator_set_version = 11
[.../onnx/src/ops/resize.rs:11] ctx.onnx_operator_set_version = 11

called `Result::unwrap()` on an `Err` value: Evaluating #219 "Resize_99" Resize: output 0, expected 1,24,40,40,F32, got 1,24,20,20,F32 ...

@hturner08
Copy link

I also had to revert to 0.20 after running into a similar issue with wespeaker's diarization models. Inference with the unoptimized models fails:
called Result::unwrap()on anErr value: Input at index 0 has incorrect dtype or shape (got 1,82,80,F32 8.418448, 7.643861, 12.142844, 13.253984, 13.3040695, 12.930961, 12.339676, 11.143524, 12.737635, 13.239045, 13.041162, 13.224225..., expected to match fact B,T,80,F32)

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

3 participants