When you set the requires_grad=False, the parameters won’t be updated during backward pass.
You can easily freeze all the network2 parameters via:
def freeze_network2(model):
    for name, p in model.named_parameters():
        if "network2" in name:
            p.requires_grad = False