I need to implement a 2D convolution that operates on xyz coordinates.
My data is made by ordered points, with shape HxW and each point has 3 coordinates.
Ideally I can use nn.Conv2D and slide over exactly like an image.
However, before the first convolution with kernel size 3x3 I need to subtract the central point coordinates from each of the neighbours. In my understanding, this is to build a “local” feature.
Question is: how can I efficiently write this custom nn.Conv2d? Can I do it with nn.Module?
I checked here 3 but I wasn’t able to find an example of unfold. Also, not sure if it would be of reasonable performance.
Apologies if it is a silly question.