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

Method configurePlugin

plugin/detectionLayerPlugin/detectionLayerPlugin.cpp:342–359  ·  view source on GitHub ↗

Configure the layer with input and output data types.

Source from the content-addressed store, hash-verified

340
341// Configure the layer with input and output data types.
342void DetectionLayer::configurePlugin(Dims const* inputDims, int32_t nbInputs, Dims const* outputDims, int32_t nbOutputs,
343 DataType const* inputTypes, DataType const* outputTypes, bool const* inputIsBroadcast,
344 bool const* outputIsBroadcast, PluginFormat floatFormat, int32_t maxBatchSize) noexcept
345{
346 try
347 {
348 checkValidInputs(inputDims, nbInputs);
349 PLUGIN_VALIDATE(inputDims[0].d[0] == inputDims[1].d[0] && inputDims[1].d[0] == inputDims[2].d[0]);
350
351 mAnchorsCnt = inputDims[2].d[0];
352 mType = inputTypes[0];
353 mMaxBatchSize = maxBatchSize;
354 }
355 catch (std::exception const& e)
356 {
357 caughtError(e);
358 }
359}
360
361// Attach the plugin object to an execution context and grant the plugin the access to some context resource.
362void DetectionLayer::attachToContext(

Callers

nothing calls this directly

Calls 1

caughtErrorFunction · 0.85

Tested by

no test coverage detected