I have 2 losses: loss_a and loss_b


loss_a is a satisficing metrics. I just need loss_a < threshold.

loss_b is an optimizing metrics. I want it to be as low as possible.

Right now this what I am doing:
total_loss = alpha*loss_a + loss_b
total_loss.backward()

By adjusting alpha, I can adjust threshold for loss_a. Is there a better way to do this?