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

Load dynamic inputs shapes from ONNX #313

Open
salvacarrion opened this issue Dec 1, 2021 · 0 comments
Open

Load dynamic inputs shapes from ONNX #313

salvacarrion opened this issue Dec 1, 2021 · 0 comments
Assignees
Labels
Easy enhancement New feature or request

Comments

@salvacarrion
Copy link
Contributor

salvacarrion commented Dec 1, 2021

Many ONNX models have dynamic input shapes such as 3xHxW that we cannot load.

Due to our static computational graph we cannot support these dynamic shapes, so I propose that ONNX should ask for the input shape if this is indeed required (dynamic input). Else, nothing.

Examples:

// Not dynamic input shape => Okay
Net *net = import_net_from_onnx_file(model_path);

// Dynamic input shape + No given input shape => Error message asking for an input shape
Net *net = import_net_from_onnx_file(model_path);

// Dynamic input shape + Given input shape => Okay
Net *net = import_net_from_onnx_file(model_path, {in_channels, in_height, in_width});
@salvacarrion salvacarrion changed the title Load dynamic inputs ONNX Load dynamic inputs shapes from ONNX Dec 1, 2021
@salvacarrion salvacarrion added the enhancement New feature or request label Dec 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Easy enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants