You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I used to create a dataset use SafeDataset from csv file, but failed with the error of KeyError:(<function SafeDataset.__getitem__ at ...>)
Detalis
Traceback (most recent call last):
File "test.py", line 77, in <module>
main()
File "test.py", line 59, in main
for batch in test_loader:
File "/home/hotel_ai/python3/lib/python3.5/site-packages/torch/utils/data/dataloader.py", line 582, in __next__
return self._process_next_batch(batch)
File "/home/hotel_ai/python3/lib/python3.5/site-packages/torch/utils/data/dataloader.py", line 608, in _process_next_batch
raise batch.exc_type(batch.exc_msg)
IndexError: Traceback (most recent call last):
File "/home/hotel_ai/python3/lib/python3.5/site-packages/nonechucks/utils.py", line 49, in __call__
res = cache[key]
KeyError: (<function SafeDataset.__getitem__ at 0x7f81b186b950>, (0,), frozenset())
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/hotel_ai/python3/lib/python3.5/site-packages/torch/utils/data/_utils/worker.py", line 99, in _worker_loop
samples = collate_fn([dataset[i] for i in batch_indices])
File "/home/hotel_ai/python3/lib/python3.5/site-packages/torch/utils/data/_utils/worker.py", line 99, in <listcomp>
samples = collate_fn([dataset[i] for i in batch_indices])
File "/home/hotel_ai/python3/lib/python3.5/site-packages/nonechucks/utils.py", line 51, in __call__
res = cache[key] = self.func(*args, **kw)
File "/home/hotel_ai/python3/lib/python3.5/site-packages/nonechucks/dataset.py", line 96, in __getitem__
raise IndexError
IndexError
sorry, my fault, I used the defalut DataLoader in my code. replaced with SafeDataLoader and solved my problem. but I have another question, the performance seems to be not very good in my case. 215 seconds 5000 images with resnet50
Hi, I used to create a dataset use SafeDataset from csv file, but failed with the error of
KeyError:(<function SafeDataset.__getitem__ at ...>)
Detalis
and here is my code
ImageSet code, open image from http source
The text was updated successfully, but these errors were encountered: