MCPcopy Create free account
hub / github.com/NVIDIA/TensorRT / getOutputDimensions

Method getOutputDimensions

plugin/priorBoxPlugin/priorBoxPlugin.cpp:181–193  ·  view source on GitHub ↗

Computes and returns the output dimensions

Source from the content-addressed store, hash-verified

179
180// Computes and returns the output dimensions
181Dims PriorBox::getOutputDimensions(int32_t index, Dims const* inputs, int32_t nbInputDims) noexcept
182{
183 PLUGIN_VALIDATE(nbInputDims == 2);
184 // Only one output from the plugin layer
185 PLUGIN_VALIDATE(index == 0);
186 // Particularity of the PriorBox layer: no batchSize dimension needed
187 mH = inputs[0].d[1];
188 mW = inputs[0].d[2];
189 // workaround for TRT
190 // The first channel is for prior box coordinates.
191 // The second channel is for prior box scaling factors, which is simply a copy of the variance provided.
192 return Dims3(2, mH * mW * mNumPriors * 4, 1);
193}
194
195int32_t PriorBox::initialize() noexcept
196{

Callers

nothing calls this directly

Calls 1

Dims3Class · 0.85

Tested by

no test coverage detected