-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
ONNX export variable batch-size #1030
Comments
your code only support bs =1, |
i should modify it ,make it suport different batch_szie onnx export |
@daixiangzi yes it is hard coded to batch-size 1. If you'd like to submit a PR for multiple batch sizes we can look over it! One thing to keep in mind is that all of the shapes and constants must be fixed in the model forward pass to prevent onnx errors, so if you make batch size a variable you should probably define it in the model init as a constant rather than using p.shape as in the default forward method. |
yes,Only bs=fixed_number,Not bs,,,_ = p.shape,i have completed multiple batch size |
i haved submit pr,but it look like failed,i don't konw what's the reason? |
Ok, I’ll try to take a look tomorrow! Have you exported to onnx successfully using the pr code? |
yes,i can export different fixed batch size onnx model,but it appear error,when i try to export dynamic batch model, |
This issue is stale because it has been open 30 days with no activity. Remove Stale label or comment or this will be closed in 5 days. |
|
any progress on this? I'm trying to export a variable batch size for onnx model, suppose with the dynamic_axes can be dynamic, but it seems like not working. |
@luvwinnie thanks for your patience! The YOLOv3 model has strict shape requirements for exporting to ONNX, especially for dynamic batch sizes. We’re making progress on adding support for exporting models with dynamic batch sizes and hope to have an update soon. Thank you for your understanding and dedication to improving the YOLOv3 model. |
No description provided.
The text was updated successfully, but these errors were encountered: