Is there any way to perform a convolution but without summation? Concretely, assume we have a Bx3x5x5 input and a 3x3x3 kernel, when we do a conv2d operation, we get a Bx1x4x4 output. For each conv-ed kernel, the result (Bx3x3x3) is summed both over H,W dimension and C dimension and produces a Bx1x1x1 scalar, and performing this operation over all locations gives the final Bx1x4x4 output. Is there any way to get the intermediate Bx3x3x3 results for each conv-ed kernel? i.e. without performing the summation over H,W, and C dimension, and thus the final result has a size of Bx3x3x3x4x4.
I know there is a
groups option in conv2d, and by setting
groups=channel_in, we essentially prevent the summation over the C dimension, but how can we prevent the summation over the H and W dimension?