If I have something like:
model = Model(inputs = input, outputs = [y1,y2])
l1 = 0.5
l2 = 0.3
model.compile(loss = [loss1,loss2], loss_weights = [l1,l2], ...)
what does Keras do with the losses to obtain the final loss?
Is it something like:
final_loss = l1*loss1 + l2*loss2
Also, what does it mean during training? Is the loss2 only used to update the weights on layers where y2 comes from? Or is it used for all the model's layers?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…