MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / tuple_shapes

Method tuple_shapes

tensorflow/compiler/xla/python_api/xla_shape.py:82–93  ·  view source on GitHub ↗

If this is a tuple, returns its sequence of constituent Shape objects. Returns: Tuple sub-shapes. Raises: ValueError: if this is not a tuple.

(self)

Source from the content-addressed store, hash-verified

80 return self.message.dimensions
81
82 def tuple_shapes(self):
83 """If this is a tuple, returns its sequence of constituent Shape objects.
84
85 Returns:
86 Tuple sub-shapes.
87
88 Raises:
89 ValueError: if this is not a tuple.
90 """
91 if not self.is_tuple():
92 raise ValueError('tuple_shapes() called on a non-tuple shape')
93 return self._tuple_shapes
94
95 def layout(self):
96 return self.message.layout

Callers 15

xrt_client.ccFile · 0.45
ConvertShapeToTypeFunction · 0.45
CompileMethod · 0.45
GenResultMethodsFunction · 0.45
CountSubshapesMethod · 0.45
InitChildrenMethod · 0.45
IsNestedTupleMethod · 0.45
shape_util.ccFile · 0.45
SliceTupleMethod · 0.45
ElementsInRecursiveMethod · 0.45
HasPrimitiveTypeMethod · 0.45

Calls 1

is_tupleMethod · 0.95

Tested by 11

TEST_FFunction · 0.36
TEST_FFunction · 0.36
DataSizeOfShapeFunction · 0.36
BuildFakeDataOpOnDeviceFunction · 0.36
testTupleShapeMethod · 0.36
TEST_FFunction · 0.36
TEST_PFunction · 0.36
TEST_FFunction · 0.36
TEST_FFunction · 0.36
MakeFakeLiteralInternalFunction · 0.36