Pytorch_Retinaface icon indicating copy to clipboard operation
Pytorch_Retinaface copied to clipboard

ONNX -> TRT fails

Open gan3sh500 opened this issue 5 years ago • 3 comments
trafficstars

The exported onnx model from this repo currently fails with TRT 7.x.

The failure happens when the onnx model is parsed by TRT. The parsed model will be missing most of its layers.

I was able to fix this by changing the opset_version in torch.onnx.export. I can PR if you see this issue as relevant. I also have scripts to convert the ONNX model to TRT engine without using onnx2trt library which is pretty difficult to use especially if using Jetson.

gan3sh500 avatar Sep 08 '20 23:09 gan3sh500

UPD: Found it, would try it later, thanks!

Hi! Can you share ONNX to TRT conversion example? I was able to convert model to TRT, but outputs are of completely different shapes

SthPhoenix avatar Sep 11 '20 14:09 SthPhoenix

@SthPhoenix Ah yes. Outputs are flatten. Should reshape back.

gan3sh500 avatar Sep 24 '20 11:09 gan3sh500

Please refer #116

yumaofan avatar Oct 30 '20 10:10 yumaofan