You can directly access these parameters via:
conv = nn.Conv2d(
    in_channels=1,
    out_channels=3,
    kernel_size=(3, 4),
    stride=(5, 6),
    dilation=(7, 8),
)

print(conv.in_channels)
print(conv.out_channels)
print(conv.kernel_size)
print(conv.stride)
print(conv.dilation)