| 134 | } |
| 135 | |
| 136 | Dims 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 | |
| 157 | DimsExprs CropAndResizeDynamicPlugin::getOutputDimensions( |
| 158 | int32_t outputIndex, DimsExprs const* inputs, int32_t nbInputs, IExprBuilder& exprBuilder) noexcept |
nothing calls this directly
no test coverage detected