How to convert Yolo shortcut to TRT


I trying to convert YoloV3-Tiny-PRN to TensorRT model to use in DeepStream SDK on my Jetson Nano. But i’m having problems with shortcut conversion because PRN uses:


and default yolo models uses:


How can I edit engine to convert yolov3-tiny-prn to TRT?

Darknet log:


NVIDIA Jetson Nano
DeepStream SDK 4.0.2
Jetpack 4.3

I successfully added Leaky Relu activation but I’m getting in 22 and 25 shortcut layers:

[ElementWise]: elementwise inputs must have same dimensions or follow broadcast rules (input dimensions were [128,26,26] and [256,26,26])

How can I solve this error?


Error seems to be because of input dimension mismatch:
Input dim to layer 22 and 25 layers are:
26x26x128 and 26x26x256

In TRT, Elementwise operation should statisfy following condition:
For each dimension, their lengths must match, or one of them must be one. In the latter case, the tensor is broadcast along that axis.


I successfully converted, thanks!

Hi, can you share the details on how you converted ? This would be very helpful for people running into the same issue.

Thanks !

I think my edited code only works in YoloV3-Tiny-PRN. You can see in my repo.