Do you mind sharing some code snippets on how to implement either in pytorch?
I assume it’s related to torch.utils.data.sampler, but not sure which specific sampler to use for this per-class sampling. Thanks!