You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I'm training a PicoDet XS network on a custom dataset using PaddleDetection. The training completes successfully, and the model export works fine.
However, when I try to convert it to ONNX using paddle2onnx, I get the following error:
Due to the operator: hard_swish, requires opset_version >= 14.
Checking the PaddleDetection code, I see that HardSwish is used in LCNet and other components. However, I noticed that the pre-converted ONNX model example available in the README does not contain HardSwish.
To resolve this, I tried downgrading PaddleDetection to versions 2.3 and 2.4 (the first versions introducing PicoDet), but the issue persists.
I strictly need an ONNX model with Opset 11 for further conversion.
My questions:
How can I modify the network to avoid HardSwish or any other Opset 14 operators?
Is there a way to obtain the same network as the example ONNX model but compatible with Opset 11?
Any guidance would be greatly appreciated.
Thanks!
The text was updated successfully, but these errors were encountered:
I set the activation function to relu6 in the configuration, then it will not use HardSwish (it is not very important for my case).
LCNet, LCPAN and PicoHeadV2 all take this parameter (act: relu6).
However, LCPAN doesn't follow that setting, that is why I did this PR (you can manually make that small change to LCPAN if you want to): PaddlePaddle/PaddleDetection#9280
(Note that the issue is with PaddleDetection, not Paddle itself, so perhaps this issue should be there instead)
@nicklasb Yes, I had already tried all those steps before opening the issue, but there always seemed to be a hard_swish inside the network that forced ONNX export to jump to level 14. What resolved the issue were exactly your PR changes, as you mentioned, LCPAN does not follow the activation rule specified in the config.
Also act: relu6 need to be placed in the conv_feat of PicoHeadV2
请提出你的问题 Please ask your question
Hi,
I'm training a PicoDet XS network on a custom dataset using PaddleDetection. The training completes successfully, and the model export works fine.
However, when I try to convert it to ONNX using
paddle2onnx
, I get the following error:Checking the PaddleDetection code, I see that HardSwish is used in LCNet and other components. However, I noticed that the pre-converted ONNX model example available in the README does not contain HardSwish.
To resolve this, I tried downgrading PaddleDetection to versions 2.3 and 2.4 (the first versions introducing PicoDet), but the issue persists.
I strictly need an ONNX model with Opset 11 for further conversion.
My questions:
How can I modify the network to avoid HardSwish or any other Opset 14 operators?
Is there a way to obtain the same network as the example ONNX model but compatible with Opset 11?
Any guidance would be greatly appreciated.
Thanks!
The text was updated successfully, but these errors were encountered: