The TF documentation says that running these two lines
t = tf.constant([[[1, 1, 1], [2, 2, 2]], [[3, 3, 3], [4, 4, 4]]])
tf.rank(t)
should return 3, as the tensor rank is 3. However, it returns
<tf.Tensor 'Rank_1:0' shape=() dtype=int32>
The documentation also says the rank function is equivalent to numpy's ndim so I ran it over the given array and it does return 3.
Is there any reason for this problem? I am using the integrated Ipython console in Spyder; python 3.5