parameters: (tensor, tag=None)
return_statement: return standard_ops.scalar_summary(tag, tensor, name='%s_summary' % tag)
docstring: Add a scalar summary operation for the tensor.
  
    Args:
      tensor: The tensor to summarize.
      tag: The tag to use, if None then use tensor's op's name.
  
    Returns:
      The created histogram summary.
  
    Raises:
      ValueError: If the tag is already in use or the rank is not 0.
docstring_summary: Add a scalar summary operation for the tensor.
docstring_tokens: Add a scalar summary operation for the tensor .
function: def _add_scalar_summary(tensor, tag=None):
    """Add a scalar summary operation for the tensor.
  
    Args:
      tensor: The tensor to summarize.
      tag: The tag to use, if None then use tensor's op's name.
  
    Returns:
      The created histogram summary.
  
    Raises:
      ValueError: If the tag is already in use or the rank is not 0.
    """
    tensor.get_shape().assert_has_rank(0)
    tag = tag or tensor.op.name
    assert_summary_tag_unique(tag)
    return standard_ops.scalar_summary(tag, tensor, name='%s_summary' % tag)
function_tokens: def _add_scalar_summary ( tensor , tag = None ) : tensor . get_shape ( ) . assert_has_rank ( 0 ) tag = tag or tensor . op . name assert_summary_tag_unique ( tag ) return standard_ops . scalar_summary ( tag , tensor , name = '%s_summary' % tag )