Split the data set to train specific classes

How could I split the mnist dataset only training specific classes like number 0-8?

You could probably extend or modify the MNIST dataset to only include train/test data with labels from 0-8 in the __init__ method.

1 Like

Thanks Richard. It turns out I build my own dataloader according to the MNIST dataset loader you pointed.

can you describe or link to the code that does this please? Thanks! :slight_smile: