class_docstr: Represents the shape of a `Tensor`.
  
  A `TensorShape` represents a possibly-partial shape specification for a
  `Tensor`. It may be one of the following:
  
  * *Fully-known shape:* has a known number of dimensions and a known size
    for each dimension. e.g. `TensorShape([16, 256])`
  * *Partially-known shape:* has a known number of dimensions, and an unknown
    size for one or more dimension. e.g. `TensorShape([None, 256])`
  * *Unknown shape:* has an unknown number of dimensions, and an unknown
    size in all dimensions. e.g. `TensorShape(None)`
  
  If a tensor is produced by an operation of type `"Foo"`, its shape
  may be inferred if there is a registered shape function for
  `"Foo"`. See @{$adding_an_op#shape-functions-in-c$`Shape functions in C++`}
  for details of shape functions and how to register them. Alternatively,
  the shape may be set explicitly using @{tf.Tensor.set_shape}.
class_docstr_tok: ["Represents","the","shape","of","a","`","Tensor","`",".","A","`","TensorShape","`","represents","a","possibly-partial","shape","specification","for","a","`","Tensor","`",".","It","may","be","one","of","the","following",":","*","*","Fully-known","shape",":","*","has","a","known","number","of","dimensions","and","a","known","size","for","each","dimension",".","e.g",".","`","TensorShape","(","[","16",",","256","]",")","`","*","*","Partially-known","shape",":","*","has","a","known","number","of","dimensions",",","and","an","unknown","size","for","one","or","more","dimension",".","e.g",".","`","TensorShape","(","[","None",",","256","]",")","`","*","*","Unknown","shape",":","*","has","an","unknown","number","of","dimensions",",","and","an","unknown","size","in","all","dimensions",".","e.g",".","`","TensorShape","(","None",")","`","If","a","tensor","is","produced","by","an","operation","of","type","`","``","Foo","''","`",",","its","shape","may","be","inferred","if","there","is","a","registered","shape","function","for","`","``","Foo","''","`",".","See","@","{","$","adding_an_op","#","shape-functions-in-c","$","`","Shape","functions","in","C++","`","}","for","details","of","shape","functions","and","how","to","register","them",".","Alternatively",",","the","shape","may","be","set","explicitly","using","@","{","tf.Tensor.set_shape","}","."]
docstr: Returns True iff `self` is convertible with `other`.
  
  Two possibly-partially-defined shapes are convertible if there
  exists a fully-defined shape that both shapes can represent. Thus,
  convertibility allows the shape inference code to reason about
  partially-defined shapes. For example:
  
  * TensorShape(None) is convertible with all shapes.
  
  * TensorShape([None, None]) is convertible with all two-dimensional
    shapes, such as TensorShape([32, 784]), and also TensorShape(None). It is
    not convertible with, for example, TensorShape([None]) or
    TensorShape([None, None, None]).
  
  * TensorShape([32, None]) is convertible with all two-dimensional shapes
    with size 32 in the 0th dimension, and also TensorShape([None, None])
    and TensorShape(None). It is not convertible with, for example,
    TensorShape([32]), TensorShape([32, None, 1]) or TensorShape([64, None]).
  
  * TensorShape([32, 784]) is convertible with itself, and also
    TensorShape([32, None]), TensorShape([None, 784]), TensorShape([None,
    None]) and TensorShape(None). It is not convertible with, for example,
    TensorShape([32, 1, 784]) or TensorShape([None]).
  
  The convertibility relation is reflexive and symmetric, but not
  transitive. For example, TensorShape([32, 784]) is convertible with
  TensorShape(None), and TensorShape(None) is convertible with
  TensorShape([4, 4]), but TensorShape([32, 784]) is not convertible with
  TensorShape([4, 4]).
  
  Args:
    other: Another TensorShape.
  
  Returns:
    True iff `self` is convertible with `other`.
docstr_tok: ["Returns","True","iff","`","self","`","is","convertible","with","`","other","`",".","Two","possibly-partially-defined","shapes","are","convertible","if","there","exists","a","fully-defined","shape","that","both","shapes","can","represent",".","Thus",",","convertibility","allows","the","shape","inference","code","to","reason","about","partially-defined","shapes",".","For","example",":","*","TensorShape","(","None",")","is","convertible","with","all","shapes",".","*","TensorShape","(","[","None",",","None","]",")","is","convertible","with","all","two-dimensional","shapes",",","such","as","TensorShape","(","[","32",",","784","]",")",",","and","also","TensorShape","(","None",")",".","It","is","not","convertible","with",",","for","example",",","TensorShape","(","[","None","]",")","or","TensorShape","(","[","None",",","None",",","None","]",")",".","*","TensorShape","(","[","32",",","None","]",")","is","convertible","with","all","two-dimensional","shapes","with","size","32","in","the","0th","dimension",",","and","also","TensorShape","(","[","None",",","None","]",")","and","TensorShape","(","None",")",".","It","is","not","convertible","with",",","for","example",",","TensorShape","(","[","32","]",")",",","TensorShape","(","[","32",",","None",",","1","]",")","or","TensorShape","(","[","64",",","None","]",")",".","*","TensorShape","(","[","32",",","784","]",")","is","convertible","with","itself",",","and","also","TensorShape","(","[","32",",","None","]",")",",","TensorShape","(","[","None",",","784","]",")",",","TensorShape","(","[","None",",","None","]",")","and","TensorShape","(","None",")",".","It","is","not","convertible","with",",","for","example",",","TensorShape","(","[","32",",","1",",","784","]",")","or","TensorShape","(","[","None","]",")",".","The","convertibility","relation","is","reflexive","and","symmetric",",","but","not","transitive",".","For","example",",","TensorShape","(","[","32",",","784","]",")","is","convertible","with","TensorShape","(","None",")",",","and","TensorShape","(","None",")","is","convertible","with","TensorShape","(","[","4",",","4","]",")",",","but","TensorShape","(","[","32",",","784","]",")","is","not","convertible","with","TensorShape","(","[","4",",","4","]",")",".","Args",":","other",":","Another","TensorShape",".","Returns",":","True","iff","`","self","`","is","convertible","with","`","other","`","."]
code: def is_convertible_with(self, other):
      """Returns True iff `self` is convertible with `other`.
  
      Two possibly-partially-defined shapes are convertible if there
      exists a fully-defined shape that both shapes can represent. Thus,
      convertibility allows the shape inference code to reason about
      partially-defined shapes. For example:
  
      * TensorShape(None) is convertible with all shapes.
  
      * TensorShape([None, None]) is convertible with all two-dimensional
        shapes, such as TensorShape([32, 784]), and also TensorShape(None). It is
        not convertible with, for example, TensorShape([None]) or
        TensorShape([None, None, None]).
  
      * TensorShape([32, None]) is convertible with all two-dimensional shapes
        with size 32 in the 0th dimension, and also TensorShape([None, None])
        and TensorShape(None). It is not convertible with, for example,
        TensorShape([32]), TensorShape([32, None, 1]) or TensorShape([64, None]).
  
      * TensorShape([32, 784]) is convertible with itself, and also
        TensorShape([32, None]), TensorShape([None, 784]), TensorShape([None,
        None]) and TensorShape(None). It is not convertible with, for example,
        TensorShape([32, 1, 784]) or TensorShape([None]).
  
      The convertibility relation is reflexive and symmetric, but not
      transitive. For example, TensorShape([32, 784]) is convertible with
      TensorShape(None), and TensorShape(None) is convertible with
      TensorShape([4, 4]), but TensorShape([32, 784]) is not convertible with
      TensorShape([4, 4]).
  
      Args:
        other: Another TensorShape.
  
      Returns:
        True iff `self` is convertible with `other`.
      """
      other = as_shape(other)
      if self._dims is not None and other.dims is not None:
          if self.ndims != other.ndims:
              return False
          for x_dim, y_dim in zip(self._dims, other.dims):
              if not x_dim.is_convertible_with(y_dim):
                  return False
      return True
  
imports: from .None import compat, dtypes
  from tensorboard.compat.proto import tensor_shape_pb2
label_desc: Use image node_id 19 for calling the TensorShape obj's underlying member method code with example usage: obj.is_convertible_with(other) and returns: True, False, False