Skip to content

Load dynamic inputs shapes from ONNX #313

Open
@salvacarrion

Description

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});

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions