Fix YOLO kernels

- Fix YOLO kernels
- Update deprecated functions
This commit is contained in:
unknown
2021-12-12 09:58:23 -03:00
parent ce35e17334
commit 9565254551
11 changed files with 316 additions and 153 deletions

View File

@@ -19,10 +19,10 @@ nvinfer1::ILayer* maxpoolLayer(
int stride = std::stoi(block.at("stride"));
nvinfer1::IPoolingLayer* pool
= network->addPooling(*input, nvinfer1::PoolingType::kMAX, nvinfer1::DimsHW{size, size});
= network->addPoolingNd(*input, nvinfer1::PoolingType::kMAX, nvinfer1::DimsHW{size, size});
assert(pool);
std::string maxpoolLayerName = "maxpool_" + std::to_string(layerIdx);
pool->setStride(nvinfer1::DimsHW{stride, stride});
pool->setStrideNd(nvinfer1::DimsHW{stride, stride});
pool->setPaddingMode(nvinfer1::PaddingMode::kSAME_UPPER);
pool->setName(maxpoolLayerName.c_str());