1

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?

Ahmad
  • 645
  • 2
  • 6
  • 21

1 Answers1

1

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.

Nicolas Gervais
  • 33,817
  • 13
  • 115
  • 143