Skip to content

KeyError issue #81

Description

@Amajo0209

Hi, I am trying to train the mcan model using gqa dataset, and everytime I try to run, I get the following error:

Traceback (most recent call last):
File "run.py", line 162, in
execution.run(__C.RUN_MODE)
File "D:\VQA_docs\openvqa-master\utils\exec.py", line 33, in run
train_engine(self.__C, self.dataset, self.dataset_eval)
File "D:\VQA_docs\openvqa-master\utils\train_engine.py", line 137, in train_engine
for (step,frcn_feat_iter, grid_feat_iter, bbox_feat_iter, ques_ix_iter, ans_iter) in enumerate(dataloader):
File "C:\Users\PC\AppData\Local\Programs\Python\Python37\lib\site-packages\torch\utils\data\dataloader.py", line 521, in next
data = self._next_data()
File "C:\Users\PC\AppData\Local\Programs\Python\Python37\lib\site-packages\torch\utils\data\dataloader.py", line 1203, in _next_data
return self._process_data(data)
File "C:\Users\PC\AppData\Local\Programs\Python\Python37\lib\site-packages\torch\utils\data\dataloader.py", line 1229, in _process_data
data.reraise()
File "C:\Users\PC\AppData\Local\Programs\Python\Python37\lib\site-packages\torch_utils.py", line 434, in reraise
raise exception
KeyError: Caught KeyError in DataLoader worker process 0.
Original Traceback (most recent call last):
File "C:\Users\PC\AppData\Local\Programs\Python\Python37\lib\site-packages\torch\utils\data_utils\worker.py", line 287, in _worker_loop
data = fetcher.fetch(index)
File "C:\Users\PC\AppData\Local\Programs\Python\Python37\lib\site-packages\torch\utils\data_utils\fetch.py", line 49, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "C:\Users\PC\AppData\Local\Programs\Python\Python37\lib\site-packages\torch\utils\data_utils\fetch.py", line 49, in
data = [self.dataset[idx] for idx in possibly_batched_index]
File "D:\VQA_docs\openvqa-master\openvqa\core\base_dataset.py", line 36, in getitem
frcn_feat_iter, grid_feat_iter, bbox_feat_iter = self.load_img_feats(idx, iid)
File "D:\VQA_docs\openvqa-master\openvqa\datasets\gqa\gqa_loader.py", line 204, in load_img_feats
frcn_feat = np.load(self.iid_to_frcn_feat_path[iid])
KeyError: '2363772'

I was getting some other errors before this one, and I got to solve them. however, the only issue I am struggling with now is this one. DOES ANYONE KNOW HOW I CAN FIX THIS?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions