alexandrosstergiou/SoftPool

about dim Ceil_Mode =True

XinyingZheng opened this issue · 2 comments

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

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!