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

Method rank

tensorflow/compiler/xla/shape.h:51–54  ·  view source on GitHub ↗

Returns the rank (number of dimensions) of the given shape. Shape must be an array.

Source from the content-addressed store, hash-verified

49 // Returns the rank (number of dimensions) of the given shape. Shape must be
50 // an array.
51 int64 rank() const {
52 CHECK(IsArray()) << "Non-arrays do not have a rank, shape: " << ToString();
53 return dimensions_.size();
54 }
55
56 // Returns whether the shape is of the specified type (array, tuple, etc).
57 bool IsArray() const { return primitive_util::IsArrayType(element_type()); }

Callers 15

mainFunction · 0.45
dataset.pyFile · 0.45
_transpose_batch_timeFunction · 0.45
_transpose_batch_timeFunction · 0.45
_transpose_batch_timeFunction · 0.45
_transpose_batch_timeFunction · 0.45
test_mpi_rankMethod · 0.45
test_mpi_allgatherMethod · 0.45

Calls 2

ToStringFunction · 0.70
sizeMethod · 0.45

Tested by 15

test_mpi_rankMethod · 0.36
test_mpi_allgatherMethod · 0.36
_do_maximum_meanFunction · 0.36
checkFunction · 0.36
testRankMethod · 0.36
TESTFunction · 0.36