They are initialized at the time the Module is instantiated, i.e. conv1 = nn.Conv2d(3, 6, 5), through the reset_parameters() method, which is executed as part of the Module’s __init__ 1. The dimensions of the kernel and bias are set through the module’s constructor arguments 1. If you want to change the parameters’ initialization you can do so explicitly with the functions defined in torch.nn.init and the Module’s apply(fn) method, e.g.
def init_weights(m):
    if type(m) == nn.Linear:
        torch.nn.init.xavier_uniform(m.weight)
    elif type(m) == nn.Conv2d:
        # Some other initalization

net = Net()
net.apply(init_weights)