torchlayers icon indicating copy to clipboard operation
torchlayers copied to clipboard

convolution padding same on even-valued arguments

Open triwahyuu opened this issue 4 years ago • 2 comments

is there any possibility for the 'same' padding convolution to work on even values of kernel size, stride, and dilation?

triwahyuu avatar Apr 15 '20 13:04 triwahyuu

See PyTorch's Feature Request, in case of torchlayers there are also some quirks one would have to solve as well.

same padding for even values would have to be done by adding asymmetric padding before convolution with one of specific modes (see here). I'm not yet sure how I'd like to follow through with this (some 3D, 1D layers are missing for some padding modes, so I might have to implement my own new layer padding any dimension).

Should be possible to do though, will sit on it during the weekend and keep you updated if anything changes.

szymonmaszke avatar Apr 17 '20 00:04 szymonmaszke

thanks for the answer. I still don't quite understand what the padding argument in the convolution really

triwahyuu avatar Apr 17 '20 10:04 triwahyuu