alexandrosstergiou / SoftPool

[ICCV 2021] Code for approximated exponential maximum pooling
MIT License
288 stars 52 forks source link

about some implementation issues #4

Closed dlyldxwl closed 3 years ago

dlyldxwl commented 3 years ago

Thank you for your sharing~ However I have some doubts,

  1. this code represents the weight value is calculation by using channel dimension on the same spatial position, rather than applying spatial region? https://github.com/alexandrosstergiou/SoftPool/blob/7cd12c72b7096bc70d136e6b001eb2c338461bb2/pytorch/SoftPool/idea.py#L181

  2. for the last pooling layer, global avg pooling is better than softpool?

Looking forward to your reply

alexandrosstergiou commented 3 years ago

Hi @dlyldxwl,

Thank you for pointing (1.) out. The non-native CUDA functions have not been updated for a while. I'll include this in the latest commit. Do note that you are encouraged to use the CUDA-native versions CUDA_SOFTPOOLxd for better performance. The in-place alternatives are less stable by nature.

As for using SoftPool for vectorisation, we have not tested this as the paper was focusing on sub-sampling image/video regions. But you can of course try it out yourself. I would be interested in the results as well if you do!

Best, Alex