yifanjiang19 / sppnet-pytorch

A simple Spatial Pyramid Pooling layer which could be added in CNN
Apache License 2.0
331 stars 133 forks source link

The difference with AdaptivePooling in PyTorch #3

Closed zhaohui-yang closed 5 years ago

zhaohui-yang commented 5 years ago

Hi, I wonder what is the difference between your implementation of SPP layer and AdaptativeAvgPool2d or AdaptativeMaxPool2d in PyTorch lib? Doc: AdaptativeAvgPool2d

Standard AdaptiveAvgPool2d receives pooled size as input and accept any size feature maps, I think this is an implementation of SPP layer.

So, what is the difference between your implementation and those standard functions?

yifanjiang19 commented 5 years ago

There is no overlap in sppnet procedure, but in adaptativeavgpool2d I guess it isn't. And sppnet uses maxpool instead of avgpool.

zhaohui-yang commented 5 years ago

Thanks a lot. AdaptativeMaxPool2d has maximum width or height overlap of 1 pixel. I think this might be the difference.