Reputation: 143
I have a tensor of batch size of 64. Each sample in the batch is of shape [4, 300]
. So, shape of my batch is [64, 4, 300]
. I want to randomly shuffle the elements of the batch. In other words, I want to shuffle all 64 [4, 300]
tensors. How can I do this? The resulting tensor will obviously be of shape [64, 4, 300]
, but all the 64 rows of shape [4, 300]
, will be ordered differently.
Upvotes: 7
Views: 6055