alexandrosstergiou / SoftPool

[ICCV 2021] Code for approximated exponential maximum pooling

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

about

PJJie opened this issue · comments

commented

It's OK to change “nn.MaxPool2d(2)“ to “out = soft_pool2d(out, 2)”, but changing ”nn.MaxPool2d((2, 1))” to ”out = soft_pool2d(out, (2,1)) “ or "out = soft_pool2d(out, 2,1)"will result in wrong dimension. What's the reason?

This is based on the function definitions (see lines 160-164 in pytorch/SoftPool/idea.py for reference) where the kernel_size and stride can only be int or tuple objects.

Also do note that nn.MaxPool2d is a torch.nn.Module object, equivalently to SoftPool2d,
soft_pool2d is a function which only makes sense to use during execution time.

Since you're now using soft_pool() does that mean that you resolved the previously opened issue (#8)? If so please close it.

Best,
Alex