What is the mathematical notation for a 2D convolution over a 3D input?

83 Views Asked by At

I am looking at representing mathematically the forward pass of a 2D convolution over a 3D input. To be more precise, I want to apply a filter $(f_{h}, f_{w})$ over each channel dimension of an image with dimensions $(n_{h}, n_{w}, n_{c})$ WITHOUT convoluting the channel dimensions together. So my input of dimension $(n_{h}, n_{w}, n_{c})$ should be minimized in the $(n_{h}, n_{w})$ dimensions but not in $n_{c}$.

Therefore, I am in effect performing a 2D convolution on a 3D tensor. My questions is how can I rearange the below equation to describe what I am trying to do mathematically. The term $\sum_{k=1}^{n_{c}^{l-1}}$ assumes I am performing element-wise multiplication between channel dimensions, which I am not. So somehow I have to remove that and place the term elsewhere to show I am still doing so from all channel dimensions from $k=1$ to $n_{c}$.

$conv(a^{l-1}, K)_{x,y}= \\ \psi\left( \sum_{i=1}^{n_{h}^{l-1}} \sum_{j=1}^{n_{w}^{l-1}} \sum_{k=1}^{n_{c}^{l-1}} K^{n}_{i,j,k}a^{l-1}_{x+i-1, y+j-1, k} + b^{l} \right) $