fangpin / siamese-pytorch

Implementation of Siamese Networks for image one-shot learning by PyTorch, train and test model on dataset Omniglot
285 stars 62 forks source link

python3 train.py gives the following error: line 23, in find_classes FileNotFoundError: [Errno 2] No such file or directory: 'background' #2

Closed Sumes closed 6 years ago

Sumes commented 6 years ago

python3 train.py
gives the following error: Traceback (most recent call last): File "train.py", line 29, in train_dataset = dset.ImageFolder(root=train_path) File "/home/sumes/anaconda3/lib/python3.6/site-packages/torchvision-0.2.1-py3.6.egg/torchvision/datasets/folder.py", line 178, in init File "/home/sumes/anaconda3/lib/python3.6/site-packages/torchvision-0.2.1-py3.6.egg/torchvision/datasets/folder.py", line 75, in init File "/home/sumes/anaconda3/lib/python3.6/site-packages/torchvision-0.2.1-py3.6.egg/torchvision/datasets/folder.py", line 23, in find_classes FileNotFoundError: [Errno 2] No such file or directory: 'background'

fangpin commented 6 years ago

@Sumes go into train.py and change the variable 'train_path' and 'test_path' to the path to your training and test data folder.