Imbalanced Classification

Hi, just wondering if anyone could help to generate imbalanced CIFAR10 and CIFAR100 datasets in python.

For the sake of completeness:
here is an old tutorial, which creates an artificially imbalanced CIFAR10 dataset. Could you reuse it or is something missing for your use case?

Yeh, that tutorial is a very gud guide, however, using its snippet for imbalanced dataset creation in my code causes the following error:
for count, prop in zip(train_class_counts, imbal_class_prop)
TypeError: only size-1 arrays can be converted to Python scalars

In original tutorial it is line number 272.

Thanks for reporting this issue.
After fixing some legacy code, such as:

targets, class_counts = get_labels_and_class_counts(

I can run the code without the issue in line272.
Are you seeing any other issues before this failure?

I have also fixed that issue, however problem is occuring when I inject that piece of code in my code. Moreover, could you please guide where (line number) have you made the above change.