KeyError: Caught KeyError in DataLoader worker process 0.
Original Traceback (most recent call last):
File "/home/envs/pytorch/lib/python3/site-packages/torch/utils/data/_utils/worker.py", line 202, in _worker_loop
data = fetcher.fetch(index)
File "/home/envs/pytorch/lib/python3/site-packages/torch/utils/data/_utils/fetch.py", line 44, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/home/envs/pytorch/lib/python3/site-packages/torch/utils/data/_utils/fetch.py", line 44, in
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/home/Video-Swin-Transformer-master/mmaction/datasets/base.py", line 287, in getitem
return self.prepare_train_frames(idx)
File "/home/Video-Swin-Transformer-master/mmaction/datasets/rawframe_dataset.py", line 168, in prepare_train_frames
return self.pipeline(results)
File "/home/Video-Swin-Transformer-master/mmaction/datasets/pipelines/compose.py", line 41, in call
data = t(data)
File "/home/ideo-Swin-Transformer-master/mmaction/datasets/pipelines/loading.py", line 1153, in call
if results['frame_inds'].ndim != 1:
KeyError: 'frame_inds'
I guess you didn't write the config file correct. You can check the compose order in your train_pipeline: maybe you put the DecordDecode before SampleFrames or you miss it .
KeyError: Caught KeyError in DataLoader worker process 0. Original Traceback (most recent call last): File "/home/envs/pytorch/lib/python3/site-packages/torch/utils/data/_utils/worker.py", line 202, in _worker_loop data = fetcher.fetch(index) File "/home/envs/pytorch/lib/python3/site-packages/torch/utils/data/_utils/fetch.py", line 44, in fetch data = [self.dataset[idx] for idx in possibly_batched_index] File "/home/envs/pytorch/lib/python3/site-packages/torch/utils/data/_utils/fetch.py", line 44, in
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/home/Video-Swin-Transformer-master/mmaction/datasets/base.py", line 287, in getitem
return self.prepare_train_frames(idx)
File "/home/Video-Swin-Transformer-master/mmaction/datasets/rawframe_dataset.py", line 168, in prepare_train_frames
return self.pipeline(results)
File "/home/Video-Swin-Transformer-master/mmaction/datasets/pipelines/compose.py", line 41, in call
data = t(data)
File "/home/ideo-Swin-Transformer-master/mmaction/datasets/pipelines/loading.py", line 1153, in call
if results['frame_inds'].ndim != 1:
KeyError: 'frame_inds'