Fix TensorRT

This commit is contained in:
Marcos Luciano
2022-07-14 16:51:12 -03:00
parent 8983e7e99e
commit 2424397822
2 changed files with 5 additions and 2 deletions

View File

@@ -23,7 +23,8 @@ nvinfer1::ILayer* maxpoolLayer(
assert(pool);
std::string maxpoolLayerName = "maxpool_" + std::to_string(layerIdx);
pool->setStrideNd(nvinfer1::Dims{2, {stride, stride}});
if (stride == 1) {
if (stride == 1)
{
pool->setPaddingNd(nvinfer1::Dims{2, {size / 2, size / 2}});
}
pool->setName(maxpoolLayerName.c_str());