Multi headed losses

We are trying to impose a mutli-headed loss on the network. We have two branches in the network architecture. How do we impose losses on these two branches separately? The loss on one branch should be imposed every iteration and one on the other branch every xth iteration. Is there a way equivalent to Tensorflow Variable scope to impose losses only on a certain part of the network?