title: How does keras handle multiple losses?
body: <p>If I have something like:</p>
  
  
  
  <pre class="lang-python prettyprint-override"><code>model = Model(inputs = input, outputs = [y1,y2])
  
  l1 = 0.5
  l2 = 0.3
  model.compile(loss = [loss1,loss2], loss_weights = [l1,l2], ...)
  </code></pre>
  
  <p>what does Keras do with the losses to obtain the final loss?
  Is it something like:</p>
  
  <pre class="lang-python prettyprint-override"><code>final_loss = l1*loss1 + l2*loss2
  </code></pre>
  
  <p>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?</p>