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

Method getOutputDimensions

plugin/cropAndResizePlugin/cropAndResizePlugin.cpp:136–155  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

134}
135
136Dims CropAndResizePlugin::getOutputDimensions(int32_t index, Dims const* inputs, int32_t nbInputDims) noexcept
137{
138 try
139 {
140 PLUGIN_VALIDATE(index == 0);
141 PLUGIN_VALIDATE(nbInputDims == 2);
142 PLUGIN_VALIDATE(inputs != nullptr);
143 PLUGIN_VALIDATE(inputs->nbDims == 3);
144 int32_t channels = inputs->d[0];
145 int32_t height = mCropHeight;
146 int32_t width = mCropWidth;
147 int32_t roiBatch = inputs[1].d[0];
148 return Dims4(roiBatch, channels, height, width);
149 }
150 catch (std::exception const& e)
151 {
152 caughtError(e);
153 }
154 return Dims{};
155}
156
157DimsExprs CropAndResizeDynamicPlugin::getOutputDimensions(
158 int32_t outputIndex, DimsExprs const* inputs, int32_t nbInputs, IExprBuilder& exprBuilder) noexcept

Callers

nothing calls this directly

Calls 3

Dims4Class · 0.85
caughtErrorFunction · 0.85
constantMethod · 0.80

Tested by

no test coverage detected