One possibility is you could add the two losses together. This would save you computation and time so you do not have to perform two backwards passes. And then for the evaluation metric you can just print the two losses individually.