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

fuse_bn_into_conv optimizer in pypi linux wheels is wrong #2677

Closed
daquexian opened this issue Mar 23, 2020 · 3 comments
Closed

fuse_bn_into_conv optimizer in pypi linux wheels is wrong #2677

daquexian opened this issue Mar 23, 2020 · 3 comments
Labels
bug optimizer Issues related to ONNX optimizers

Comments

@daquexian
Copy link
Member

daquexian commented Mar 23, 2020

Reference: daquexian/onnx-simplifier#50

Here are some onnx models, where MBV3_SSD_onnx.onnx is the original model, mbv3_ssd_onnx_sim_macos.onnx is the model after optimizing and simplifying on macOS, MBV3_SSD_onnx_sim_onnx_16_pip.onnx is the model after optimizing and simplifying on ubuntu.

The "1523" tensors of the last two models differ a lot, which is caused by the onnx fuse_bn_into_conv optimizer. The tensor in ubuntu model (no matter produced by onnx 1.5 or 1.6) is totally wrong while the macOS version is right.

However, if I compiled and install onnx from source on ubuntu, the optimized model is correct and the same as that on macOS.

@daquexian daquexian changed the title fuse_bn_into_conv optimizer in pypi ubuntu py3.5 wheels is wrong fuse_bn_into_conv optimizer in pypi ubuntu wheels is wrong Mar 23, 2020
@daquexian daquexian changed the title fuse_bn_into_conv optimizer in pypi ubuntu wheels is wrong fuse_bn_into_conv optimizer in pypi linux wheels is wrong Mar 24, 2020
@askhade
Copy link
Contributor

askhade commented Jun 2, 2020

@daquexian : Is this still a problem in the latest onnx version?

@askhade askhade added the bug label Jun 2, 2020
@daquexian
Copy link
Member Author

daquexian commented Jun 6, 2020

@askhade yes, I just verified it still exits on onnx 1.7.0 installed by pip3 install onnx==1.7.0 on linux. what's more, if I installed onnx by pip3 install onnx==1.7.0 --no-binary onnx (which builds onnx from source instead of installing the prebuilt binary), the problem disappears

@daquexian
Copy link
Member Author

daquexian commented Oct 14, 2020

I believe it has been fixed by #3021

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug optimizer Issues related to ONNX optimizers
Projects
None yet
Development

No branches or pull requests

2 participants