parameters: (value, dtype=None, axes=None, name=None)
docstring: Creates a constant tensor.
  
    If `axes` includes any strings, shape is inferred from `value`. Otherwise,
    the sizes of the given `axes` are used to set `shape` for `tf.constant`.
  
    See tf.constant for more details.
  
    Args:
      value: The input tensor.
      dtype: The type of the returned tensor.
      axes: Optional Axes, list of strings or list of objects coercible to Axis
        objects. By default, axes are assumed to be an empty list (i.e., `value`
        is treated as a scalar).
      name: Optional op name.
  
    Returns:
      The tensor with elements set to zero.
docstring_summary: Creates a constant tensor.
docstring_tokens: Creates a constant tensor .
function: def constant(value, dtype=None, axes=None, name=None):
    """Creates a constant tensor.
  
    If `axes` includes any strings, shape is inferred from `value`. Otherwise,
    the sizes of the given `axes` are used to set `shape` for `tf.constant`.
  
    See tf.constant for more details.
  
    Args:
      value: The input tensor.
      dtype: The type of the returned tensor.
      axes: Optional Axes, list of strings or list of objects coercible to Axis
        objects. By default, axes are assumed to be an empty list (i.e., `value`
        is treated as a scalar).
      name: Optional op name.
  
    Returns:
      The tensor with elements set to zero.
    """
    with ops.name_scope(name, 'lt_constant', [value]) as scope:
  
      if axes is None:
        axes = []
  
      if isinstance(axes, core.Axes):
        axes = axes.values()
  
      if any(isinstance(ax, string_types) for ax in axes):
        # need to infer shape
        shape = None
      else:
        # axes already indicate shape
        axes = [core.as_axis(a) for a in axes]
        shape = [a.size for a in axes]
  
      op = array_ops.constant(value, dtype=dtype, shape=shape, name=scope)
      return core.LabeledTensor(op, axes)
function_tokens: def constant ( value , dtype = None , axes = None , name = None ) : with ops . name_scope ( name , 'lt_constant' , [ value ] ) as scope : if axes is None : axes = [ ] if isinstance ( axes , core . Axes ) : axes = axes . values ( ) if any ( isinstance ( ax , string_types ) for ax in axes ) : # need to infer shape shape = None else : # axes already indicate shape axes = [ core . as_axis ( a ) for a in axes ] shape = [ a . size for a in axes ] op = array_ops . constant ( value , dtype = dtype , shape = shape , name = scope ) return core . LabeledTensor ( op , axes )