Commit bc7431bd by Siva Committed by Tianqi Chen

[NNVM][POOL] bug fix. Remove the hardcode. (#1600)

parent daa25699
...@@ -77,7 +77,7 @@ inline bool Pool2DInferShape(const nnvm::NodeAttrs& attrs, ...@@ -77,7 +77,7 @@ inline bool Pool2DInferShape(const nnvm::NodeAttrs& attrs,
} else { } else {
oshape[hidx] = ((dshape[hidx] + pad_h - param.pool_size[0] + oshape[hidx] = ((dshape[hidx] + pad_h - param.pool_size[0] +
param.strides[0] - 1) / param.strides[0]) + 1; param.strides[0] - 1) / param.strides[0]) + 1;
oshape[widx] = ((dshape[3] + pad_w - param.pool_size[1] + oshape[widx] = ((dshape[widx] + pad_w - param.pool_size[1] +
param.strides[1] - 1) / param.strides[1]) + 1; param.strides[1] - 1) / param.strides[1]) + 1;
} }
NNVM_ASSIGN_OUTPUT_SHAPE(attrs, *out_shape, 0, oshape); NNVM_ASSIGN_OUTPUT_SHAPE(attrs, *out_shape, 0, oshape);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment