def vin_loss_reduce_fn(losses, loss_weight):
  """For multiple targets, get_vin_loss will return a list of losses; 
    calculate the aggregated loss from all the losses
  Args:
    losses: the output of get_vin_loss for multiple targets
    loss_weights: a list of floats as loss weights for all the targets
  """
  return sum(losses[j][0]*loss_weight[j] for j in range(len(losses)))