Here is the drive location of the MNIST-M Dataset: MNIST-M folder 37. So the images are not stored in folders for each class, rather all the images have been stored in the same folder.
Kindly note that the MNIST-M class defined above also loads the samples lazily like ImageFolder but since I’m only interested in a subset of the data, this will amount to reading the entire dataset again and again and only filtering the classes I’m interested in, which is computationally expensive as compared to having a preprocessed dataset containing only the classes of interest.