Hi @Pongroc.
In principle, alpha is a hyperparameter, so it is not learned by gradient-based optimization, but rather by cross-validation. (You know what cross-validation is, right?)
You may ask why is that so - and that’s precisely what I am going to try to explain. Suppose that loss_1 is typically much larger than loss_2. Then, if you try to learn alpha and the remaining parameters jointly, in such a way that the loss_total is minimized, most likely you will get a value for alpha that is very close to 0, i.e. the optimization simply removes the contribution of loss_1 to your loss_total. This does not mean, however, that loss_1 will be low - on the contrary, it will probably be high. If both loss_1 and loss_2 are measurements of how well your model behaves (in two different senses), then probably you want both to be relatively low instead of having one that is very low and the other one that is very high. The role of the hyperparameter alpha is, therefore, to weight these two losses in some way that optimizes the performance of your model, not necessarily minimizing loss_total.
If it makes it easier for you to understand, you may also think of it in the context of regularization. You usually do not learn your regularization hyperparameter together with the model parameters, do you?
Note that the usual regularized loss has a form that is very similar to the loss I proposed:
,
where  is some regularization function (e.g. L-2 norm).
Dividing the RHS by a constant (independent of theta) does not change the minimizer of the function, so I may equivalently redefine the loss as:
,
which, by setting
,
has exactly the same form as the loss_total that I proposed in my first reply to this topic.
Now, note that if we set alpha to a value that is very close to 0 (or, equivalently, if we set lambda to a very large value), our loss_total will be totally dominated by the regularization term, and so we’ll get a model with a very poor performance (high bias), because it basically learns nothing related with the specific problem we are trying to solve. On the other hand, if we set alpha to a value that is very close to 1 (or, equivalently, if we set lambda to a very small value), our loss_total will be almost unregularized, and so we are likely to have a model that does not generalize well (high variance).