Solved by ptrblck in post #2 
              
              
                I’m not sure what your notation means exactly, but you could use a simple example as given here: 
weight = torch.ones(1, 1, 2, 2)
x = torch.arange(4*4).view(1, 1, 4, 4).float()
print(weight)
> tensor([[[[1., 1.],
            [1., 1.]]]])

print(x)
> tensor([[[[ 0.,  1.,  2.,  3.],
            [ 4., …