-
Notifications
You must be signed in to change notification settings - Fork 7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Suggestion] Regarding ImageFolder #145
Comments
Or, since it's already a class, make |
I guess It would be nice if PyTorch got a generic Possibly it would be best to refactor Finally, maybe |
I think we can make I think that having a What do you think? Would you be willing to send a PR improving ImageFolder with support for a custom |
I'm not sure about how many use cases there are to supply a custom How about moving |
@fmassa , it's currently not possible to only override Considering that overriding one requires overriding the other, what if there were a wrapper function in DatasetFolder, called |
Edit, I found a solution to my concerns. Submitting a new PR now. |
These really ought to be methods of the class such that they can individually be overwritten in a user's child-class IMO. |
* Addresses issue #145 as per @fmessa's suggestion. * Removed blank line for styling.
Fixed via #145. |
* Addresses issue pytorch#145 as per @fmessa's suggestion. * Removed blank line for styling.
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
The text was updated successfully, but these errors were encountered: