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

Function unknown_shape

tensorflow/python/framework/tensor_shape.py:1219–1239  ·  view source on GitHub ↗

Returns an unknown TensorShape, optionally with a known rank. Args: rank: (Optional) If specified, the number of dimensions in the shape. **kwargs: For backwards compatibility. Returns: An unknown TensorShape. Raises: TypeError: In case of invalid arguments.

(rank=None, **kwargs)

Source from the content-addressed store, hash-verified

1217
1218
1219def unknown_shape(rank=None, **kwargs):
1220 """Returns an unknown TensorShape, optionally with a known rank.
1221
1222 Args:
1223 rank: (Optional) If specified, the number of dimensions in the shape.
1224 **kwargs: For backwards compatibility.
1225
1226 Returns:
1227 An unknown TensorShape.
1228
1229 Raises:
1230 TypeError: In case of invalid arguments.
1231 """
1232 if rank is None and "ndims" in kwargs:
1233 rank = kwargs.pop("ndims")
1234 if kwargs:
1235 raise TypeError("Unknown argument: %s" % kwargs)
1236 if rank is None:
1237 return TensorShape(None)
1238 else:
1239 return TensorShape([Dimension(None)] * rank)
1240
1241
1242@deprecation.deprecated(None, "Use tf.TensorShape([]).")

Callers 5

__getitem__Method · 0.70
concatenateMethod · 0.70
with_rankMethod · 0.70
TEST_FFunction · 0.50

Calls 3

TensorShapeClass · 0.70
DimensionClass · 0.70
popMethod · 0.45

Tested by 1

TEST_FFunction · 0.40