I am new in tensorflow and have a question about tf.rank method.
In the doc https://www.tensorflow.org/api_docs/python/tf/rank there is a simple example about the tf.rank:
# 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
But when I run the code below:
t = tf.constant([[[1, 1, 1], [2, 2, 2]], [[3, 3, 3], [4, 4, 4]]])
print(tf.rank(t)) # 3
I get output like:
Tensor("Rank:0", shape=(), dtype=int32)
Why can I get the output of "3"?