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

[Export] Keep user-provided dynamic axes #1442

Merged
merged 3 commits into from
Mar 16, 2023
Merged

[Export] Keep user-provided dynamic axes #1442

merged 3 commits into from
Mar 16, 2023

Conversation

KSGulin
Copy link
Contributor

@KSGulin KSGulin commented Mar 15, 2023

When exporting models, we currently ignore user-provided dynamic axes argument and instead default to always making batch size dynamic. This overwrites other dynamic inputs, such as image size in yolov5.

The change here preserves the default of always setting the batch size to dynamic and preserves the user/integration input, giving preferences to dynamic batch size.

Test plan
Covered by existing tests

Local test
Running the command below and creating a deepspare pipeline with the resulting model and a custom image size.
sparseml.yolov5.export_onnx --weights zoo:cv/detection/yolov5-l/pytorch/ultralytics/coco/pruned94_quant-none --dynamic

@KSGulin KSGulin requested a review from a team March 15, 2023 15:53
@KSGulin KSGulin self-assigned this Mar 15, 2023
@KSGulin KSGulin requested review from markurtz, DaltheCow and anmarques and removed request for a team March 15, 2023 15:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants