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 yolov7-pose with dynamic batch size #12

Open
tvoesolncee opened this issue Apr 13, 2023 · 0 comments
Open

Export yolov7-pose with dynamic batch size #12

tvoesolncee opened this issue Apr 13, 2023 · 0 comments

Comments

@tvoesolncee
Copy link

tvoesolncee commented Apr 13, 2023

How to export model properly to ONNX/TRT with dynamic batching?

Changing code by adding dynamic_axes parameter while ONNX export doesn`t work:

torch.onnx.export(model, img, onnx_path, verbose=False, opset_version=12, input_names=['input'], output_names=["output"], dynamic_axes={'input' : {0 : 'batch_size'}, 'output' : {0 : 'batch_size'}})

Viewing model in netron shows input and output with dynamic batch but there is batch size 1 hardcoded operations inside the model.
image
yolov7_dyn_batch onnx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant