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

Function rank

tensorflow/python/framework/common_shapes.py:36–40  ·  view source on GitHub ↗

Return a rank if it is a tensor, else return None.

(tensor)

Source from the content-addressed store, hash-verified

34
35
36def rank(tensor):
37 """Return a rank if it is a tensor, else return None."""
38 if isinstance(tensor, ops.Tensor):
39 return tensor._rank() # pylint: disable=protected-access
40 return None
41
42
43def scalar_shape(unused_op):

Callers

nothing calls this directly

Calls 1

_rankMethod · 0.45

Tested by

no test coverage detected