-
Notifications
You must be signed in to change notification settings - Fork 7.2k
Closed
Description
Follow up to #4925 and as summarized in #4925 (comment), we need to allow empty class folders in ImageFolder i.e. we need a way for users to bypass this error:
vision/torchvision/datasets/folder.py
Lines 98 to 99 in c8c3839
| if empty_classes: | |
| msg = f"Found no valid file for the classes {', '.join(sorted(empty_classes))}. " |
The most obvious way to enable that is by adding a new allow_empty parameter to make_dataset() and ImageFolder() / DatasetFolder(). (name TBD).