you could use convolution kernels of size 1.
transform your input to a 1-dimensional spatial input and “spread” the 12 features along the channel dimensions. (x = x.view(1,12,1) (batch, channel, space))
then you define a 1D-convolution with bias set to True with 12 input channels and 12 output channels and set the number of groups to 12 to ensure your kernels don’t mix along channels. (c1d = torch.nn.Conv1d(kernel_sz=1, in_chan=12, out_chan=12, bias=True, groups=12))
this way, you basically learn a weight and a bias for each channel separately and afterwards you resize the output back from 12 channels to a spatial extend of 12. (y = c1d(x); y = y.view(1,1,12))
https://pytorch.org/docs/stable/nn.html?highlight=conv1d#torch.nn.Conv1d 13
I hope this helps