parameters: (losses, num_present)
return_statement: return _safe_div(total_loss, num_present)
docstring: Computes a safe mean of the losses.
  
    Args:
      losses: A tensor whose elements contain individual loss measurements.
      num_present: The number of measurable losses in the tensor.
  
    Returns:
      A scalar representing the mean of the losses. If `num_present` is zero,
        then zero is returned.
docstring_summary: Computes a safe mean of the losses.
docstring_tokens: Computes a safe mean of the losses .
function: def _safe_mean(losses, num_present):
    """Computes a safe mean of the losses.
  
    Args:
      losses: A tensor whose elements contain individual loss measurements.
      num_present: The number of measurable losses in the tensor.
  
    Returns:
      A scalar representing the mean of the losses. If `num_present` is zero,
        then zero is returned.
    """
    total_loss = math_ops.reduce_sum(losses)
    return _safe_div(total_loss, num_present)
function_tokens: def _safe_mean ( losses , num_present ) : total_loss = math_ops . reduce_sum ( losses ) return _safe_div ( total_loss , num_present )