What is the use of Shuffling a Tensor
Off the top of my head, here is an example usage:
Imagine you are passing the validation_split parameter (or similar) to the model. This parameter always splits the data in the same way.
But, if your data is ordered, e.g. by type, then the model will only be trained on a skewed subset. I.e. it will become specialised to data which is not fully representative of the population.
Thus, you could use the shuffle function to remove any orderings/biases in the subset before feeding it to the model.
Another similar purpose could be to prevent the model from learning the order of the data instead of inferring connections between data points.
I have a general question regarding
tf.random.shuffle()
What is the use of shuffling a tensor in a neural network model ??