That can be achieved easily by using indexing:
x = torch.pad(x, [1 * dilation] * 2)
x = x.unfold(2, 2 * dilation + 1, 1)[..., ::dilation]    #shape = (1, 16, 8820, 3)
...

In numpy you can alternate the stride size of the ndarray to do dilated convolution. Here’s an example implemention 3, you can check it for details.