parameters: (name, input_tensor)
return_statement: return (metric_variable.value(), update_op)
docstring: A metric which takes on its last updated value.
  
    This keeps evaluation metrics in sync with one another, since update ops are
    run separately from their result Tensors. Simply returning (input_tensor,
    no_op) as a metric with a value but no update means that a metric will come
    from a different batch of data than metrics which cache values in a Variable
    (e.g. the default loss metric).
  
    Args:
      name: A name for the metric.
      input_tensor: Any Tensor.
    Returns:
      A tuple of (value, update_op).
docstring_summary: A metric which takes on its last updated value.
docstring_tokens: A metric which takes on its last updated value .
function: def _identity_metric_single(name, input_tensor):
    """A metric which takes on its last updated value.
  
    This keeps evaluation metrics in sync with one another, since update ops are
    run separately from their result Tensors. Simply returning (input_tensor,
    no_op) as a metric with a value but no update means that a metric will come
    from a different batch of data than metrics which cache values in a Variable
    (e.g. the default loss metric).
  
    Args:
      name: A name for the metric.
      input_tensor: Any Tensor.
    Returns:
      A tuple of (value, update_op).
    """
    metric_variable = variable_scope.variable(
        name="{}_identity_metric".format(name),
        initial_value=array_ops.zeros([], dtype=input_tensor.dtype),
        collections=[ops.GraphKeys.LOCAL_VARIABLES],
        validate_shape=False)
    update_op = state_ops.assign(
        metric_variable, input_tensor, validate_shape=False)
    # This shape will be correct once the first update runs (but may be
    # incomplete, so is not helpful for initializing the variable).
    metric_variable.set_shape(input_tensor.get_shape())
    return (metric_variable.value(), update_op)
function_tokens: def _identity_metric_single ( name , input_tensor ) : metric_variable = variable_scope . variable ( name = "{}_identity_metric" . format ( name ) , initial_value = array_ops . zeros ( [ ] , dtype = input_tensor . dtype ) , collections = [ ops . GraphKeys . LOCAL_VARIABLES ] , validate_shape = False ) update_op = state_ops . assign ( metric_variable , input_tensor , validate_shape = False ) # This shape will be correct once the first update runs (but may be # incomplete, so is not helpful for initializing the variable). metric_variable . set_shape ( input_tensor . get_shape ( ) ) return ( metric_variable . value ( ) , update_op )