Default kernel size maxpool2d

if i give something like this to maxpool2d

F.max_pool2d(self.conv1(x), 2))

the 2 here defines the stride, just to clarify
what would the kernel size be?

You define the kernel_size in the call. If no stride was set, it will be set to the kernel_size as well.

but in this call what would the kernel size and stride be, both 2?

Yes, in your example code both values will be set to 2, such that the spatial dimensions will be halved.