It is as simple as saying it, you do not need to define anything new. You can just do it this way:
out_1 = network_1(input)
out_2 = network_2(out_1)
loss = loss_function(out_2, target)
loss.backward()

If there is no processing in between, you can also put both of them in a Sequential by doing network = nn.Sequential(network_1, network_2)