Please help me! tensorrt6: Assertion `C2 == inputDims[param.inputOrder[1]].d[0]' failed

I am trying to run pelee on tx2 and use tensorrt acceleration, and I found this:
So I deploy according to this project.
Since my tensorrt is 6.0,so I removed pelee_merged.caffemodel.cache and rerun
But it did not succeed.
The log shows:
pelee: nvPluginsLegacy.cpp:1026: virtual void nvinfer1::plugin::DetectionOutputLegacy::configure(const nvinfer1::Dims*, int, const nvinfer1::Dims*, int, int): Assertion `C2 == inputDims[param.inputOrder[1]].d[0]’ failed.
Aborted (core dumped)

This may be caused by different versions of tensorrt, mine is tensorrt6, but the original author was tensorrt4.
I looked for a lot, and I tried six combinations of “inputOrder=[0, 1, 2],” but it still didn’t work.
Please give my some hints for modification, Sincere thanks for you!!!

This seems to be similar to below issue:

Please refer to below comments on reported git issue:


@SunilJB Hi,
Thanks for your reply.
Sorry, that issue was actually raised by me, and I didn’t get a reply or answer. So I came here for help.
I know it was caused by different versions of tensorrt. But I dont know how to modify. Please give me some hints.


You can try asking the author on their github thread again for help.

Meanwhile, you can try to change the implementation in pluginImplement.h and pluginImplement.cpp to use IPluginV2, as described in these docs:


Thanks for your reply.
I will try it.