Describe the bug
I use timm to create 'swin_tiny_patch4_window7_224', and then I use torch.onnx.export to export [ swin_tiny_patch4_window7_224.onnx ] model. After that , I use onnxruntime to run the model , It's OK.
But After I use onnx_simplifier to simplify swin_tiny.onnx, Onnxruntime cannot run ,and got errors like this:
onnxruntime.capi.onnxruntime_pybind11_state.Fail: [ONNXRuntimeError] : 1 : FAIL : Load model from swin_tiny_patch4_window7_224.onnx failed:Node (/layers/layers.0/blocks/blocks.0/Reshape_6) Op (Reshape) [ShapeInferenceError] Dimension could not be inferred: incompatible shapes
Describe the bug I use timm to create 'swin_tiny_patch4_window7_224', and then I use torch.onnx.export to export [ swin_tiny_patch4_window7_224.onnx ] model. After that , I use onnxruntime to run the model , It's OK.
But After I use onnx_simplifier to simplify swin_tiny.onnx, Onnxruntime cannot run ,and got errors like this:
onnxruntime.capi.onnxruntime_pybind11_state.Fail: [ONNXRuntimeError] : 1 : FAIL : Load model from swin_tiny_patch4_window7_224.onnx failed:Node (/layers/layers.0/blocks/blocks.0/Reshape_6) Op (Reshape) [ShapeInferenceError] Dimension could not be inferred: incompatible shapes
My Code