IndexError: Caught IndexError in DataLoader worker process 0.
Original Traceback (most recent call last):
File “/home/ducanh/anaconda3/envs/sigma_2/lib/python3.9/site-packages/torch/utils/data/_utils/worker.py”, line 351, in _worker_loop
data = fetcher.fetch(index) # type: ignore[possibly-undefined]
File “/home/ducanh/anaconda3/envs/sigma_2/lib/python3.9/site-packages/torch/utils/data/_utils/fetch.py”, line 55, in fetch
return self.collate_fn(data)
File “/tmp/ipykernel_8451/2647283629.py”, line 15, in call
img_ids = transposed_batch[2]
IndexError: list index out of range
Are you using a custom collate_fn
as transposed_batch
is not used in the default implementation?
yes, I’m using collator = BatchCollator(32)