onnx2torch icon indicating copy to clipboard operation
onnx2torch copied to clipboard

Does onnx2torch support dynamic input shape?

Open liamsun2019 opened this issue 11 months ago • 1 comments

Hi author, I am curious if onnx2torch supports dynamic input shape. I try to convert an onnx whose input shape is dynamic, i.e, [batch, 10, 20, 30]. The conversion looks normal where no errors rise up. But the inference based on the converted model fails with following errors:

RuntimeError: Given groups=1, weight of size [xx, yy, zz], expected input[aa, bb, cc] to have XX channels, but got YY channels instead

The code snippet: model = onnx2torch.convert(onnx_model) model(*dummy_input)

Any comments? Thanks.

liamsun2019 avatar Mar 19 '24 06:03 liamsun2019