We all know that convolution operator is just a linear operator acting in sliding window way.
 1
I am trying to implement SimNet Convolotion 32, which apply merely lp norm before the linear operation.
 1
Or we can say, the original 1d convolution is:
 3
And I want:

What’s the best way to do in pytorch?