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

[BUG] #50

Closed
corleonechensiyu opened this issue Mar 23, 2020 · 10 comments
Closed

[BUG] #50

corleonechensiyu opened this issue Mar 23, 2020 · 10 comments
Labels
external issue Issues caused by external library, like onnxruntime, pytorch->onnx converter

Comments

@corleonechensiyu
Copy link

Describe the bug
Checking 0/3...
Tensor scores changes after simplifying. The max diff is 0.37125229835510254.
Note that the checking is not always correct.
After simplifying:
[[[9.3386704e-01 2.9077111e-03 2.2453293e-03 ... 1.6835716e-03
1.1354900e-03 1.8100661e-03]
[9.4730669e-01 1.0944547e-03 1.0280557e-03 ... 2.2252749e-03
3.2085853e-03 3.3723232e-03]
[9.1126448e-01 4.0056766e-03 2.4932963e-03 ... 5.8777770e-04
2.2106536e-03 1.0412371e-03]
...
[2.5697947e-01 3.6060717e-02 2.1950582e-03 ... 9.7272865e-02
2.8366329e-02 8.7439425e-02]
[2.8084219e-01 2.3728541e-01 3.0571911e-02 ... 7.2766706e-02
1.6120823e-02 6.8334460e-02]
[1.5737572e-01 1.9133696e-03 9.7480938e-03 ... 7.4628435e-02
6.2059723e-03 3.0124951e-02]]]
Before simplifying:
[[[0.86023927 0.00735333 0.00441171 ... 0.00390399 0.00354641 0.00487716]
[0.89039016 0.00274161 0.00309724 ... 0.00576726 0.00513357 0.00982196]
[0.8634894 0.00552442 0.00474672 ... 0.00136774 0.00317875 0.00178858]
...
[0.5530022 0.02890183 0.00509811 ... 0.03678409 0.03503098 0.03874877]
[0.54851794 0.07100447 0.02439926 ... 0.03236982 0.02336247 0.02174926]
[0.508326 0.00574843 0.01278591 ... 0.0319036 0.01349589 0.02038678]]]

Check failed, please be careful to use the simplified model.

Model
已发邮箱

@daquexian
Copy link
Owner

Thanks for your issue! I found it is a bug of onnx optimizers. Would you mind if I share your model with onnx team so that they may try to fix the bug?

@corleonechensiyu
Copy link
Author

corleonechensiyu commented Mar 23, 2020 via email

@daquexian
Copy link
Owner

I have posted an issue in ONNX repo: onnx/onnx#2677.

@daquexian daquexian added the external issue Issues caused by external library, like onnxruntime, pytorch->onnx converter label Mar 23, 2020
@corleonechensiyu
Copy link
Author

corleonechensiyu commented Mar 23, 2020 via email

@daquexian
Copy link
Owner

@corleonechensiyu As a temporary workaround, you can specify --skip-optimization when runnin onnxsim

@corleonechensiyu
Copy link
Author

corleonechensiyu commented Mar 23, 2020 via email

@zhuyu-cs
Copy link

#47 may also help you.

@daquexian
Copy link
Owner

daquexian commented Mar 23, 2020

@corleonechensiyu @zhuyu-cs onnx-simplifier v0.2.6 is published. It added "--skip-fuse-bn" to avoid these failures. This issue will be closed and the problem should be tracked in onnx/onnx#2677.

@corleonechensiyu
Copy link
Author

@corleonechensiyu @zhuyu-cs onnx-simplifier v0.2.6 is published. It added "--skip-fuse-bn" to avoid these failures. This issue will be closed and the problem should be tracking in onnx/onnx#2677.

谢谢大老师!

@zhuyu-cs
Copy link

daquexian dalao!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
external issue Issues caused by external library, like onnxruntime, pytorch->onnx converter
Projects
None yet
Development

No branches or pull requests

3 participants