Caffe to TensorRT on Jetson TX2 Permute custom layer implementation

Hi I am trying to run caffe SSDMobileNet (https://github.com/chuanqi305/MobileNet-SSD) in TensorRT environment on Jetson TX2 to do this I took sampleFasterRcnn code from usr/src/tensorrt/samples and just changed parameters in CaffetoGIEModel function withh SSDMobileNet prototext and model file namely “MobileNetSSD_deploy.prototxt” and “MobileNetSSD_deploy.caffemodel” and kept these file in corresponding data folder now after make when I am running it the error I am getting is

Begin parsing model…
[libprotobuf ERROR google/protobuf/text_format.cc:298] Error parsing text-format ditcaffe.NetParameter: 1177:17: Message type “ditcaffe.LayerParameter” has no field named “permute_param”.
Could not parse deploy file
End parsing model…

I think there are some layer like permute missing in TensorRT now when I went through TensorRT doc I came to know we can implement our own custom layer using plugin api but I dont know how to do that and can not find any tutorial or documentation which explain how to do that… I am new to TensorRT any kind of help is really appreciated

Hi,

Permute is a non-supported layer. Please implement it with Plugin API.

Here is the information about how to implement a custom layer for your reference:

Document:
/usr/share/doc/tensorrt/

3.8. SamplePlugin - Implementing a Custom Layer

Samples:
Native sample:
/usr/src/tensorrt/samples/samplePlugin/samplePlugin.cpp
/usr/src/tensorrt/samples/sampleCharRNN/sampleCharRNN.cpp
/usr/src/tensorrt/samples/sampleFasterRCNN/sampleFasterRCNN.cpp
TX2 sample:
https://github.com/AastaNV/Face-Recognition

Thanks.