-
Notifications
You must be signed in to change notification settings - Fork 27
Description
when i run the train.py with mit.yml ,here is the error:
Traceback (most recent call last):
File "train.py", line 233, in
main()
File "train.py", line 100, in main
train(epoch, image_extractor, model, trainloader, optimizer, writer)
File "train.py", line 122, in train_normal
for idx, data in tqdm(enumerate(trainloader), total=len(trainloader), desc = 'Training'):
File "/home/idea/anaconda3/envs/czsl/lib/python3.8/site-packages/tqdm/std.py", line 1166, in iter
for obj in iterable:
File "/home/idea/anaconda3/envs/czsl/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 435, in next
data = self._next_data()
File "/home/idea/anaconda3/envs/czsl/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 1085, in _next_data
return self._process_data(data)
File "/home/idea/anaconda3/envs/czsl/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 1111, in _process_data
data.reraise()
File "/home/idea/anaconda3/envs/czsl/lib/python3.8/site-packages/torch/_utils.py", line 428, in reraise
raise self.exc_type(msg)
FileNotFoundError: Caught FileNotFoundError in DataLoader worker process 0.
Original Traceback (most recent call last):
File "/home/idea/anaconda3/envs/czsl/lib/python3.8/site-packages/torch/utils/data/_utils/worker.py", line 198, in _worker_loop
data = fetcher.fetch(index)
File "/home/idea/anaconda3/envs/czsl/lib/python3.8/site-packages/torch/utils/data/_utils/fetch.py", line 44, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/home/idea/anaconda3/envs/czsl/lib/python3.8/site-packages/torch/utils/data/_utils/fetch.py", line 44, in
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/home/idea/zzy/czsl/data/dataset.py", line 405, in getitem
img = self.loader(image)
File "/home/idea/zzy/czsl/data/dataset.py", line 25, in call
img = Image.open(ospj(self.root_dir,img)).convert('RGB') #We don't want alpha
File "/home/idea/anaconda3/envs/czsl/lib/python3.8/site-packages/PIL/Image.py", line 2904, in open
fp = builtins.open(filename, "rb")
FileNotFoundError: [Errno 2] No such file or directory: 'DATA_ROOT/mit-states/images/ripe_coffee/IMG_3474.jpg'
but when I run with the utzappos dataset, there are no errors!
I have not idea how to fix this error. IMG_3474.jpg is really an existing file in "DATA_ROOT/mit-states/images/ripe_coffee". How can I fix that error