how to shuffle part of labels at runtime

Hi,

Given a dataset containing N data points, I am interested in shuffling 10% of labels at each epoch (these 10% data points are randomly selected at each epoch). Does anyone know what might be a good way to do this?

Thank you!

I’m not sure, if I understand the question completely.
Would you like to permute only 10% of the samples in each epoch while the rest would be drawn sequentially?
If so, I think you could create the sequential indices, permute only a subset of it, and pass it to torch.utils.data.Subset in each epoch.