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