Hello 
I’m beginner in DL&Pytorch and got helped so many times via other answers of yours  in this page.
So it’s very glad to see you here first question of mine.
However, in this case unfold would might not be the case.
I am stocked because of  custom operation gives one value through one element-wise multiplication, but what I want is to bring (kernel_size x kernel_size) output of each element-wise multiplication. After multiplying, just sum down in dimension of channel.
I’ve considered view or unfold, but I think it can not help.
This way I will get input size bigger, for example if 3x3 is kernel_size
Input_size will grow 3x224,3x224.(Start from 224*224)
And then calculating new convolution of 3x3 by stride=3 will give us the normal operation does.
The reason I want to do this process is because I want to quantize part of it. Not whole.
Is there a way to solve this?
Thank you.