Solved by ptrblck in post #2 
              
              
                I’m not sure, if I understand your use case correctly, but if you want to compute the convolution manually, you could use unfold. Have a look at this post, which might be a good starter.