Implement roi pooling layer in tensorRT


I have some problems when implementing my own roi pooling layer in TensorRT.

it’s similar to the thread (

I don’t know how to change the batch size after roi pooling layer before feeding the tensor to the Fully connected layers.

the getOutputDimension of roi pooling layer is NCHW (for example, for 2000 rois we have (2000, 256, 7,7).

But is seems not work, The batch size of next FC layer is still only have batchSize=1.

I have no idea about changing the batch size after the plugin layer.

And advise?


have you solved it?


Is your problem solved ?

Same problem when implementing the proposal and roi layer…