oh wait, maybe this is better:
pad = nn.ConstantPad2D(1, filler)
input = pad(input.unsqueeze(1))
shifted = []
for i in range(9):
  shifted.append(input[... shift it here])
output = torch.cat(shifted, 1)