parameters: (labeled_tensor, axes, name=None)
docstring: Insert dimensions of size 1.
  
    See tf.expand_dims.
  
    Args:
      labeled_tensor: The input tensor.
      axes: The desired axis names as strings or tuples of (name, label),
        where `label` is the coordinate name for the new dimension `name`.
        These must include the existing axis names, and the existing names must
        appear in the same order in this list as they do in the input tensor.
      name: Optional op name.
  
    Returns:
      A tensor with an axis for each axis in axes.
      New axes are created with size 1 and do not have labeled coordinates.
  
    Raises:
      AxisOrderError: If axis names don't appear in the same order in axes
        and the labeled tensor.
docstring_summary: Insert dimensions of size 1.
docstring_tokens: Insert dimensions of size 1 .
function: def expand_dims(labeled_tensor, axes, name=None):
    """Insert dimensions of size 1.
  
    See tf.expand_dims.
  
    Args:
      labeled_tensor: The input tensor.
      axes: The desired axis names as strings or tuples of (name, label),
        where `label` is the coordinate name for the new dimension `name`.
        These must include the existing axis names, and the existing names must
        appear in the same order in this list as they do in the input tensor.
      name: Optional op name.
  
    Returns:
      A tensor with an axis for each axis in axes.
      New axes are created with size 1 and do not have labeled coordinates.
  
    Raises:
      AxisOrderError: If axis names don't appear in the same order in axes
        and the labeled tensor.
    """
    with ops.name_scope(name, 'lt_expand_dims', [labeled_tensor]) as scope:
      labeled_tensor = convert_to_labeled_tensor(labeled_tensor)
  
      axis_names = [a if isinstance(a, string_types) else a[0] for a in axes]
      check_axis_order(labeled_tensor, axis_names)
  
      reshaped_axes = []
      shape = []
      for axis_spec in axes:
        if axis_spec in labeled_tensor.axes:
          axis = labeled_tensor.axes[axis_spec]
          reshaped_axes.append(axis)
          shape.append(-1 if axis.size is None else axis.size)
        else:
          if isinstance(axis_spec, string_types):
            reshaped_axes.append((axis_spec, 1))
          else:
            (name, label) = axis_spec
            reshaped_axes.append((name, (label,)))
  
          shape.append(1)
  
      reshaped_tensor = array_ops.reshape(
          labeled_tensor.tensor, shape, name=scope)
  
      return LabeledTensor(reshaped_tensor, reshaped_axes)
function_tokens: def expand_dims ( labeled_tensor , axes , name = None ) : with ops . name_scope ( name , 'lt_expand_dims' , [ labeled_tensor ] ) as scope : labeled_tensor = convert_to_labeled_tensor ( labeled_tensor ) axis_names = [ a if isinstance ( a , string_types ) else a [ 0 ] for a in axes ] check_axis_order ( labeled_tensor , axis_names ) reshaped_axes = [ ] shape = [ ] for axis_spec in axes : if axis_spec in labeled_tensor . axes : axis = labeled_tensor . axes [ axis_spec ] reshaped_axes . append ( axis ) shape . append ( - 1 if axis . size is None else axis . size ) else : if isinstance ( axis_spec , string_types ) : reshaped_axes . append ( ( axis_spec , 1 ) ) else : ( name , label ) = axis_spec reshaped_axes . append ( ( name , ( label , ) ) ) shape . append ( 1 ) reshaped_tensor = array_ops . reshape ( labeled_tensor . tensor , shape , name = scope ) return LabeledTensor ( reshaped_tensor , reshaped_axes )