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

Function as_shape

tensorflow/python/framework/tensor_shape.py:1211–1216  ·  view source on GitHub ↗

Converts the given object to a TensorShape.

(shape)

Source from the content-addressed store, hash-verified

1209
1210
1211def as_shape(shape):
1212 """Converts the given object to a TensorShape."""
1213 if isinstance(shape, TensorShape):
1214 return shape
1215 else:
1216 return TensorShape(shape)
1217
1218
1219def unknown_shape(rank=None, **kwargs):

Callers 7

merge_withMethod · 0.85
concatenateMethod · 0.85
assert_same_rankMethod · 0.85
is_compatible_withMethod · 0.85
__eq__Method · 0.85
__ne__Method · 0.85

Calls 1

TensorShapeClass · 0.70

Tested by

no test coverage detected