| 152 | } |
| 153 | |
| 154 | Dims RPROIPlugin::getOutputDimensions(int32_t index, Dims const* inputs, int32_t nbInputDims) noexcept |
| 155 | { |
| 156 | PLUGIN_ASSERT(index >= 0 && index < 2); |
| 157 | PLUGIN_ASSERT(nbInputDims == 4); |
| 158 | PLUGIN_ASSERT(inputs[0].nbDims == 3 && inputs[1].nbDims == 3 && inputs[2].nbDims == 3 && inputs[3].nbDims == 3); |
| 159 | if (index == 0) // rois |
| 160 | { |
| 161 | return Dims3(1, params.nmsMaxOut, 4); |
| 162 | } |
| 163 | // Feature map of each ROI after ROI Pooling |
| 164 | // pool5 |
| 165 | return Dims4(params.nmsMaxOut, inputs[2].d[0], params.poolingH, params.poolingW); |
| 166 | } |
| 167 | |
| 168 | size_t RPROIPlugin::getWorkspaceSize(int32_t maxBatchSize) const noexcept |
| 169 | { |