The weight_size of the nn.Conv2d module is wrong, as it would be:
conv = nn.Conv2d(9, 1, kernel_size=(17, 17), stride=(1, 1), padding=(8, 8), bias=False)
print(conv.weight.shape)
> torch.Size([1, 9, 17, 17])

Are you changing the .weight attribute manually in your code?