Different filters for 2dConv

I’m having an input of shape (B(atch), F(features), N(odes), T(timestamps)). Right now if I apply a 2d convolution with a kernel of shape (1,2) I will have a total of (F_out, F_in, 1,2) weights to learn which is alright. I want to extend this so that for each Node in the input I have it’s own 1,2 filter. Does any of you have any idea where should I start from?

If seems you are using the Nodes and Timestamps dimensions as the spatial dimension at the moment.
If you just need a 1x2 filter, you could permute and reshape the input, so that Nodes is accumulated in dim0 together with the Batch and apply a nn.Conv1d layer.

1 Like

I don’t think that I quite understand your solution. let’s take a simple example, 2 nodes with 2 features each, 2 time stamps and a kernel of size 1x2 filled with ones. As you can see from the image the two timestamps are convolved into one, but there is no information going from node 1 to node 2 which is intended. Now I would like for each node to have it’s own filter, so features 1,2 are going to be multiplied with a filter and 2,4 with another, and same thing for the other channel.

Thank in advance for the response, and I really appreciate your help.