Please explain how this ensures we get equal split of the examples of each class. From what I understood, the only way that is possible is by carefully arranging the entries at the csv file. If I randomize the entries, the output also becomes randomized. So, it is within the realm of possibility that a particular class gets no training examples, as all of its examples lie after the split point. If it is indeed dependent on the csv file, it may be much easier to just create 2 folders.
Also, can you explain how to access all elements of a given class after it has been dumped to the dataset (preferably by ImageFolder)