Questions about AvgPooling
Created by: guoshengCS
It seems that AvgPooling gets the window without the padding cells, but when averaging the sum, the size should including the number of padding cells. The code here seems get the wrong size which not including the number of padding cells. https://github.com/PaddlePaddle/Paddle/blob/562599ecf018f2c988d0cd7ef83889738962d4d6/paddle/math/Matrix.cpp#L2161 https://github.com/PaddlePaddle/Paddle/blob/562599ecf018f2c988d0cd7ef83889738962d4d6/paddle/math/Matrix.cpp#L2168
I have tested and checked the result to validate this.
It seems that the GPU code also has the same question, but I haven't validated it. https://github.com/PaddlePaddle/Paddle/blob/3e6f76840916e649b3204cd7bb28d0fe46c30254/paddle/cuda/src/hl_cuda_cnn.cu#L225