From 019e8bbed2e5045778a95962d76fcd2c39044cc3 Mon Sep 17 00:00:00 2001 From: nhzlx Date: Mon, 10 Dec 2018 05:47:39 +0000 Subject: [PATCH] fix comments test=develop --- paddle/fluid/inference/tensorrt/convert/pool2d_op.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/paddle/fluid/inference/tensorrt/convert/pool2d_op.cc b/paddle/fluid/inference/tensorrt/convert/pool2d_op.cc index 768318fb0..1d0d83d1f 100644 --- a/paddle/fluid/inference/tensorrt/convert/pool2d_op.cc +++ b/paddle/fluid/inference/tensorrt/convert/pool2d_op.cc @@ -109,6 +109,10 @@ class Pool2dOpConverter : public OpConverter { } if (pool_type == "max") { + // Under ceil mode, the pre_pad and post_pad are used to + // record the the padding size. In some ceil mode cases, + // we do not need padding, so we initialize the two vars to 0. + nvinfer1::DimsHW pre_pad(0, 0); nvinfer1::DimsHW post_pad(0, 0); if (ceil_mode) { -- GitLab