How to set ReflectionPad with TensorRT C++ API

I attempted to buid my model with TensorRT C++ API, but I couldn’t find the API corresponding to ReflectionPad mode in pytorch. Can anybody give me some help?

self.pad = nn.ReflectionPad2d(1)

Hi @Carl_0127 ,
You can use ISliceLayer to implement Pad with kREFLECT mode: TensorRT: nvinfer1::ISliceLayer Class Reference

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.