meridian.backend.rank
Stay organized with collections
Save and categorize content based on your preferences.
Returns the rank of a tensor.
meridian.backend.rank(input,name=None)
See also tf.shape.
Returns a 0-D int32Tensor representing the rank of input.
For example:
# shape of tensor 't' is [2, 2, 3]t=tf.constant([[[1,1,1],[2,2,2]],[[3,3,3],[4,4,4]]])tf.rank(t)# 3
Note: The rank of a tensor is not the same as the rank of a matrix. The
rank of a tensor is the number of indices required to uniquely select each
element of the tensor. Rank is also known as "order", "degree", or "ndims."
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2026-05-27 UTC."],[],[]]