Since you have access to the original dataset, you might want to consider a sanity check where you put a hash of all images into a set for each of the classes, and compare this to the corresponding sets for the original dataset. You can either hash the filenames of the images (I think you should be able to get this by modifying the underlying DatasetFolder if that is what you are using) or by using some hash function on the image data itself.