If you are using ImageFolder, you can access its dataset.class_to_idx  attribute to see the mapping between the folders and the class indices.
I’m not sure if I misunderstand the question, but do all three folders contain images from the same class (one class only)?