Swin-Transformer-TensorRT icon indicating copy to clipboard operation
Swin-Transformer-TensorRT copied to clipboard

Swin does not support dynamic input shape after tracing the module

Open fatemebafghi opened this issue 2 years ago • 1 comments

hello there, I am trying to convert swin model to onnx and then tensorrt, but a problem which I face is that it does not support dynamic input resolution after tracing the model using torch.jit.trace. It seems that it is because of the mask input in window attention. Do you have any idea how I can fix this problem?

fatemebafghi avatar Dec 28 '22 11:12 fatemebafghi

hello there, I am trying to convert swin model to onnx and then tensorrt, but a problem which I face is that it does not support dynamic input resolution after tracing the model using torch.jit.trace. It seems that it is because of the mask input in window attention. Do you have any idea how I can fix this problem?

Please refer to the export-to-onnx-and-build-tensorrt-engine session in Readme. I've done some small changes, maybe it could help you.

maggiez0138 avatar Jan 18 '23 08:01 maggiez0138