How to use the LReLU plugin


I tried to execute an onnx model of YOLO by the following command:

trtexec --onnx=/workspace/YOLOv3/yolov3.onnx

However, I faced with error:

No converter registered for op type: LeakyRelu

I found this topic which mention that there is LReLu plugin.

Here I found that I have to call initLibNvInferPlugins to use these plugins. However when I added this line into trtexec.cpp I got the error:

'initLibNvInferPlugins' was not declared in this scope
     initLibNvInferPlugins(&gLogger, "");

Despite of I have added the
#include “NvInferPlugin.h” and using namespace plugin;

How can I solve this issue? Is there any example how to use these plugins?

Environment: TensorRT Docker 18.08 (


18.08 containes TRT4.0.1, which ships with an older onnx parser. Can you update to latest TRT5 or 18.11 container?

Or since the ONNX parser is an open source project, the most up-to-date parser with most supported operations can be found on ONNX TensorRT: