Oh, how did you even find that link  These are very old docs, use only docs.pytorch.org 45. When do you want to change them?
You can pass them as arguments to the Module constructor e.g.
nn.Conv2d(16, 32, kernel_size=3, padding=(5, 3))

Alternatively, if you need to change them at runtime, I’d suggest using the functional interface:
import torch.nn.functonal as F

...

F.conv2d(input, self.weight, self.bias, kernel_size=3, padding=(x, y))