jwr1995 / dc1d

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

How to learn offsets in 1D Convolution? #5

Closed maryjis closed 8 months ago

maryjis commented 8 months ago

Hello! It is used Conv2d layer for learning offset 2D deformable convolution. In readme example you use such way to declare params:

offsets = nn.Parameter(torch.ones(batch_size, 1, output_length, kernel_size, requires_grad=True)) But how we can learn offsets for current input sequence x? Can you give some example?

jwr1995 commented 8 months ago

Please see dc1d.nn.PackedDeformConv1D or Figure 3 in the paper cited in the README.md for examples using convolution

maryjis commented 8 months ago

Thank you!