tensorRT layer's information

Hi,
I am following the sampleFasterRCNN to studied tensorRT. I have this question:
How is possibile obtain layer’s information (kernel dim, input dim, pad, stride etc) from all layers of network during the parsing of it?

Hi francesco1990, nvinfer1::ICaffeParser::parse() provides INetworkDefinition output (IUffParser does too). You can use it to look up the ILayer instances using INetworkDefinition::getNbLayers() and INetworkDefinition::getLayer() functions.

Through ILayer you can get the input / output ITensor objects and their dimensions. Using ILayer::getType(), the ILayer pointers can be casted to their specific layer types, like IConvolutionLayer for example, where you can access the layer-specific parameters like stride, padding, ect.

Great, thanks.