code: def multiloss(losses, logging_namespace="multiloss", exclude_from_weighting=[]):
      
      with tf.variable_scope(logging_namespace):
          sum_loss = 0
          for loss_name, loss in losses.items():
              if loss_name not in exclude_from_weighting:
                  with tf.variable_scope(loss_name) as scope:
                      sum_loss += variance_corrected_loss(loss)
              else:
                  sum_loss += loss
          return sum_loss
docs: Create a loss from multiple losses my mixing them.
      This multi-loss implementation is inspired by the Paper "Multi-Task Learning Using Uncertainty to Weight Losses
      for Scene Geometry and Semantics" by Kendall, Gal and Cipolla.
      :param losses: A dict containing all losses that should be merged.
      :param logging_namespace: Variable scope in which multiloss lives.
      :param exclude_from_weighting: A list of losses that are already weighted and should not be sigma weighted.
      :return: A single loss.