TaoLv commented on issue #11047: Enhance mkldnn pooling to support full convention URL: https://github.com/apache/incubator-mxnet/pull/11047#issuecomment-391932978 @zheng-da I notice there already has pooling test case for both kValid and kFull: https://github.com/apache/incubator-mxnet/blob/master/tests/python/gpu/test_operator_gpu.py#L558 Do you think we still another test cast for this PR? Pooling output shape is calculated with: ``` o_h = (i_h + pad_top + pad_bottom - k_h) / stride_h ) + 1 o_w = (i_w + pad_left + pad_right - k_w) / stride_w ) + 1 ``` So if `i_h +pad_top + pad_bottom - k_h` is not divisible by `stride_h`, there will be two possible `o_h`. One is by rounding up (ceil, kFull) and the other is by rounding down (floor, kValid). In mkldnn, output shape is provided by user/developer during creating primitive/descriptor. mkldnn will check the provided output shape according to the given input shape, padding size, stride size, kernel size. In mkldnn pooling operator, we need adjust (increase) padding size (especially for pad_right and pad_bottom) to make sure the output shape (calculated by infershape) matches those input shape, padding size, stride size and kernel size.
---------------------------------------------------------------- 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
