Open yyyyyxie opened 5 months ago
If I use inputs of different sizes, it will throw an error similar to the one shown in the image. I've spent a lot of time and it seems that I haven't solved this problem.
Code: dynamic = {'inputs': {2: 'h', 3: 'w'}, 'outputs': {2: 'h', 3: 'w'}} torch.onnx.export(model, (img,), output_path, verbose=False, opset_version=17, input_names=['inputs'], output_names=['outputs'], dynamic_axes=dynamic)
It seems that I can only export ONNX with a fixed input size. I hope to set the width and height as dynamic axes. However, after setting, the exported ONNX can still only use the original width and height as the unique input shape.