Yes, the spatial output size depends on the passed inputs size, the kernel size, padding, stride and the dilation. This paper 13 gives more details about the conv arithmetic and the docs for nn.Conv2d 10 give you the applied formula.