Being a beginner to TensorFlow I couldn't get why does tensorflow.rank always return shape with null value?
This is what I am working on:
import tensorflow as tf
%tensorflow_version 2.x
list_2d = [[1,2,3,4],
[5,6,7,8],
[9,10,11,12]
]
tensor_2d = tf.Variable(list_2d)
print(tensor_2d.shape)
print(tf.rank(tensor_2d))
and the output is
(3, 4)
tf.Tensor(2, shape=(), dtype=int32)
So my question is what is this shape=() from tf.rank output?
I couldn't get much from here - https://www.tensorflow.org/api_docs/python/tf/rank