Hi! Better to create one final loss and do the backward once like so
loss = net1.get_loss() + net2.get_loss()
loss.backward()

If you don’t want to do this, have a look at the retain_graph argument to the backward function  Glgl