deformable-convolution-pytorch icon indicating copy to clipboard operation
deformable-convolution-pytorch copied to clipboard

each kernel shares the same offsets?

Open ran337287 opened this issue 8 years ago • 3 comments

#According to test.py, the line 'offset=conv(inputs)' is to learn the offset of neighbor domain of each pixel, so the size of offsets is 118H*W. if the size of input is 1x3xHxW and the size of output is 1x4xHxW, does it means that there has 4 kernels,and each kernel shares the same offsets?

ran337287 avatar Aug 10 '17 06:08 ran337287

Hi, @ran337287. You can say there is only one kernel with shape (4, 3, kH, kW), or four kernels with shape (1, 3, kH, kW). Both are acceptable. So yes, in every spatial location (i, j) ( 0 < i < H, 0 < j < W), four kernels share the same offsets.

1zb avatar Aug 10 '17 07:08 1zb

One could probably change that by modifying conv2d( groups=1) although that would not be what the original paper intended.

bkvie avatar Jun 22 '18 17:06 bkvie

@1zb would it make sense to have individual offsets? So 4 kernels of shape (1,3, kH, kW) with 4 offsets?

bkvie avatar Jun 27 '18 13:06 bkvie