I think that deformable convolution 27 is a relatively creative idea.
But what I feel is insufficient is that the size of the convolution kernel cannot be changed.
How to implement such a convolution layer in PyTorch:


Deformable convolution.


Variable convolution kernel size.


(If point 2 does not make sense in mathematical theory,)
Variable size for the image which put into the convolution kernel.
(When putting into the convolution kernel, the image will be resized to adapt to the convolution layer.)


I mean, how to implement such a convolution layer in PyTorch:

point 1 and point 2

or

point 1 and point 3

For the point 3, add a note.

My question is whether the size of the convolution kernel can also be changed dynamically.
If it doesn’t make sense in mathematical theory, I think it’s useful to dynamically adjust the size of the cut image. Then I mean the cut image is before the image with source pixel as the picture shows. The cut image will be changed the size (the same as the size of the image with source pixel in the picture) and put into the convolution kernel.