TaoLv commented on a change in pull request #13260: Support full convention in
quantized pooling
URL: https://github.com/apache/incubator-mxnet/pull/13260#discussion_r234841975
##########
File path: src/operator/quantization/quantized_pooling.cc
##########
@@ -52,17 +52,30 @@ bool QuantizedPoolingShape(const nnvm::NodeAttrs& attrs,
<< "kernel size (" << param.kernel[1]
<< ") exceeds input (" << dshape[W]
<< " padded to " << (dshape[W] + 2*param.pad[1]) << ")";
- // only support valid convention
+
oshape[N] = dshape[N];
oshape[C] = dshape[C];
if (param.global_pool) {
oshape[H] = 1;
oshape[W] = 1;
} else {
- oshape[H] = 1 + (dshape[H] + 2 * param.pad[0] - param.kernel[0]) /
- param.stride[0];
- oshape[W] = 1 + (dshape[W] + 2 * param.pad[1] - param.kernel[1]) /
- param.stride[1];
+ if (param.pooling_convention == pool_enum::kValid) {
Review comment:
Fixed.
----------------------------------------------------------------
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