Reputation: 742
I came through tensor slices and tensor rank. I read a lot of material related to this but could not satisfy myself.
Can anyone explain thoroughly with the help of examples, specifically in the view of TensorFlow?
Upvotes: 1
Views: 260
Reputation: 36674
tf.rank
is like array.ndim
in NumPy. It's the number of dimensions. E.g., a picture has rank 3:
640, 640, 3
A batched picture dataset has rank 4:
10000, 640, 640, 3
Tabular data has rank 2:
150, 4
It's that simple. Let me know if I should add anything.
Upvotes: 1