Well if you want to do that. You cannot use a single loss.
You will have to backward each loss independently and save the gradients (with .clone()).
And then you can do the same code that check the norm of each gradient and compute the final gradient.