alexandrosstergiou / SoftPool

[ICCV 2021] Code for approximated exponential maximum pooling

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

about dim Ceil_Mode =True

XinyingZheng opened this issue · comments

commented

The original pool operation can set the parameter Ceil_Mode =True, then how can the soft pool achieve the same effect, because there is a dimension mismatch problem in my replacement

Hi @XinyingZheng ,

The ceil_mode parameter just adds columns on the left and rows on the bottom side of the tensor to make the tensor fit with the parameters given.

You can simply use torch.nn.functional.pad to immitate that in your def forward(self) function.

Best,
Alex

commented

Hi @XinyingZheng ,

The ceil_mode parameter just adds columns on the left and rows on the bottom side of the tensor to make the tensor fit with the parameters given.

You can simply use torch.nn.functional.pad to immitate that in your def forward(self) function.

Best,
Alex

thank you for your reply, i have sloved this problem,best wishes to you!