cuda 9.0
tensorRT5.0,
Following the sampleUffSSD, we need to modify the config.py file to fit our ssd model. My ssd model use the size of 360*640.
Input = gs.create_node(“Input”,
op=“Placeholder”,
dtype=tf.float32,
shape=[1, 3, 360, 640]) # batch, channels, height, width
PriorBox = gs.create_plugin_node(name=“GridAnchor”, op=“GridAnchor_TRT”,
numLayers=6,
minSize=0.2,
maxSize=0.95,
aspectRatios=[1.0, 2.0, 0.5, 3.0, 0.33],
variance=[0.1,0.1,0.2,0.2],
featureMapShapes = [23, 12, 6, 3, 2, 1])
Here is my config.py. But I don’t know how to set the featureMapShapes with different h and w? In the NvInferPlugin.h, we can find some parameters definition about the struct GridAnchorParameters, but there is no featureMapShapes parameter.
struct GridAnchorParameters
{
float minSize, maxSize;
float* aspectRatios;
int numAspectRatios, H, W;
float variance[4];
};
//!
//! \param param Set of parameters for creating the PriorBox plugin layer.
//! \deprecated. This plugin is superseded by createPriorBoxPlugin()
//!
TENSORRTAPI INvPlugin* createSSDPriorBoxPlugin(PriorBoxParameters param);
TENSORRTAPI INvPlugin* createSSDPriorBoxPlugin(const void* data, size_t length);
Please tell me how to set the featureMapShapesH and featureMapShapesW? The problem has been asked, but there is no solution.If GridAnchor_TRT operation dose not support setting different h and w featureMapShapes please tell me clearly, I won’t waste my time on that. Thank you very much.