jwr1995 / dc1d

A 1D implementation of a deformable convolutional layer in PyTorch with a few tricks.
MIT License
34 stars 4 forks source link

1D kernels using deform_conv2d #4

Closed astrocyted closed 1 year ago

astrocyted commented 1 year ago

Hi,

wouldn't it have been way easier to write the deform_conv1d as a small wrapper around deform_conv2d() in which you "unsqueeze()" the 1D input (and kernal dims) and pass zeros() for the offset channel corresponding to the unsqueezed (fabricated) dimension ?

jwr1995 commented 1 year ago

Hi, yes this was what I originally did but for various reasons the pytorch deformconv_2d is not very good for interpretability and analysis or for example if you what control the minimum/maximum receptive field of the layer. This may not be important to many. Also if this is the kind of implementation you want I recommend another project called tvdcn at github.com/inspiros/tvdcn