apeforest commented on a change in pull request #12594: [MXNET-867] Pooling1D 
with "same" padding
URL: https://github.com/apache/incubator-mxnet/pull/12594#discussion_r219384478
 
 

 ##########
 File path: src/operator/nn/pooling.cc
 ##########
 @@ -126,11 +131,15 @@ static bool PoolingShape(const nnvm::NodeAttrs &attrs,
       oshape[2] = 1 +
                   (dshape[2] + 2 * param.pad[0] - param.kernel[0]) /
                       param.stride[0];
-    } else {
-      oshape[2] = 1 + static_cast<int>(std::ceil(
+    } else if (param.pooling_convention == pool_enum::kFull) {
+      oshape[2] = 1 + static_cast<int>(ceil(
                           static_cast<float>(dshape[2] + 2 * param.pad[0] -
                                              param.kernel[0]) /
                           param.stride[0]));
+    } else {
+      oshape[2] = static_cast<int>(ceil(
+                          static_cast<float>(dshape[2] + 2 * param.pad[0]) /
 
 Review comment:
   nit: indentation

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to