How to make an imbalance mnist dataset with index?

How to make an imbalance mnist dataset with three outputs like data, target, and index?

I’ve created this tutorial a while ago, which uses the CIFAR10 dataset to create an artificially imbalanced dataset, so it might be a good starter for MNIST.

2 Likes