How to convert Yolo shortcut to TRT

Issue

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:

[shortcut]
activation=leaky
from=8

and default yolo models uses:

[shortcut]
activation=linear
from=-3

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

Darknet log:

Environment

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?

Hi,

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.

Thanks

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.