vihari / CSD

Implementation and datasets for Efficient Domain Generalization via Common-Specific Low-Rank Decomposition (https://arxiv.org/abs/2003.12815)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

When run with resnet-18, it will report error

hugddygff opened this issue · comments

IndexError: Caught IndexError in DataLoader worker process 0.
Original Traceback (most recent call last):
File "/home/jintao/anaconda3/envs/py3/lib/python3.6/site-packages/torch/utils/data/_utils/worker.py", line 198, in _worker_loop
data = fetcher.fetch(index)
File "/home/jintao/anaconda3/envs/py3/lib/python3.6/site-packages/torch/utils/data/_utils/fetch.py", line 44, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/home/jintao/anaconda3/envs/py3/lib/python3.6/site-packages/torch/utils/data/_utils/fetch.py", line 44, in
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/home/jintao/CSD-master/pacs/data/concat_dataset.py", line 48, in getitem
return self.datasets[dataset_idx][sample_idx], dataset_idx
File "/home/jintao/CSD-master/pacs/data/JigsawLoader.py", line 102, in getitem
data = [tiles[self.permutations[order - 1][t]] for t in range(n_grids)]
File "/home/jintao/CSD-master/pacs/data/JigsawLoader.py", line 102, in
data = [tiles[self.permutations[order - 1][t]] for t in range(n_grids)]
IndexError: list index out of range

It seems like a wrongly set number of domains or some other configurations issue that is causing this. I am a bit occupied at the moment to help you with it. Thanks for reporting, will take a look.

This is the same issue as #3. Please refer to the comments there.

I encountered the same error when running resnet18 on pacs. Of course, I saw the issue #3, but the error is still unsolved for resnet18. Could you tell me how to solve this?