tensorrt_inference icon indicating copy to clipboard operation
tensorrt_inference copied to clipboard

ONNX export failure: ONNX export failed: Couldn't export Python operator MishCudaFunction

Open xuanzhangyang opened this issue 4 years ago • 5 comments

ONNX export failure: ONNX export failed: Couldn't export Python operator MishCudaFunction

xuanzhangyang avatar Dec 17 '20 09:12 xuanzhangyang

Has the mish cuda function been installed following the instruction: https://github.com/WongKinYiu/ScaledYOLOv4/blob/yolov4-large/README.md#installation?

linghu8812 avatar Dec 17 '20 11:12 linghu8812

Has the mish cuda function been installed following the instruction: https://github.com/WongKinYiu/ScaledYOLOv4/blob/yolov4-large/README.md#installation?

Yes, I can successfully inference yolov4-p6 model with https://github.com/WongKinYiu/ScaledYOLOv4/blob/yolov4-large engine.

xuanzhangyang avatar Dec 18 '20 01:12 xuanzhangyang

for pretrained models, these lines will work: https://github.com/linghu8812/tensorrt_inference/blob/887cca1487395cc46a23537213201d224600a976/ScaledYOLOv4/export_onnx.py#L28-L41

linghu8812 avatar Dec 18 '20 02:12 linghu8812

for pretrained models, these lines will work: https://github.com/linghu8812/tensorrt_inference/blob/887cca1487395cc46a23537213201d224600a976/ScaledYOLOv4/export_onnx.py#L28-L41

The problem is solved. # modify import in models/common.py # line 7 -> from mc.build.lib.mish_mish import MishCuda as Mish

The above steps are missing, but I don’t know why I can inference model.

xuanzhangyang avatar Dec 18 '20 02:12 xuanzhangyang

@xuanzhangyang I have the same problem, to what should i edit the line 7 ?

Thank you in advance

pepijnko avatar Mar 05 '21 07:03 pepijnko