-
Notifications
You must be signed in to change notification settings - Fork 91
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
If model use initializer, fuse_bn_into_conv is broken from v0.3.9 #133
Comments
Thanks for your issue! We'll consider how to fix it. Could you please try using onnxsim for now? |
Thank you for quickly response! |
I found another case. In general there is no such model, but the tool I was using seems to generate an onnx model that temporarily includes the bias term in the conv and then runs fuse_bn_into_conv, which fails in the optimizer after v0.3.9. There is a work-around for this case, it's no problem for now. |
@sa-kei728 What is the workaround you used? |
@AndreyOrb I would say onnx2json is also resolved this issue. |
I tried to optimize model by using "fuse_bn_into_conv", generate optimized model incorrectly from v0.3.9.
I would say 807cff7 is the cause. this commit would work fine with constant node, but the initializer shouldn't work...
Why were these changes made?
I'd like to support for initializer as well since onnxoptimizer has "extract_constant_to_initializer" which I often use to avoid errors related to topological sort. At least I wouldn't like this change.
Confirmed Environment(part of pyproject.toml)
Reproduce Code
Download tiny-yolov3.onnx (this model is used initializer)
https://github.com/onnx/models/blob/main/vision/object_detection_segmentation/tiny-yolov3/model/tiny-yolov3-11.onnx
prepare onnx and onnxoptimizer
create reproduce code
v0.3.9
in case of v0.3.8
The text was updated successfully, but these errors were encountered: