Be aware that loss1.backward() will backpropagate through network4, network2 and network1, which is probably what you want.
If one of the losses seems to be having too much influence, then you could try multiplying it by a scalar < 1.
All in all though, appart from the occasional misspelling of netwrok, it looks good to me.