Closed
Description
The current ImageFolder is much too restrictive, as is evident by the number of PRs trying to add various functionalities.
Would it make sense to simply have find_classes [1] be a callable argument similar to how a custom loader can be specified? ImageFolder can then be made recursive without impacting the current functionality, and both existing PRs (#100, #47) would be special cases of this. This change would allow ImageFolder to be a much more versatile image loader.
[1] https://github.com/pytorch/vision/blob/master/torchvision/datasets/folder.py#L17