I’ve worked on a tutorial for imbalanced training some time ago (and would need to update it to the latest PyTorch version) by creating an artificially imbalanced CIFAR10 dataset. You can find the code here 13. Maybe you could use it as a starter.