Well you could write a custom autograd.Function as explained here 362. That way you could code your custom conv2d using numpy operations, but you would have to code the backward pass explicitly.
Or you could explain what you want in a little more detail and maybe someone can show you how to accomplish it with standard tensor operations and a little ingenuity.