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
This is the command I use: !python main.py --work-dir results --device 0 --num-worker 4 --batch-size 1
Here is the error that I get:
Traceback (most recent call last):
File "main.py", line 219, in
processor.start()
File "main.py", line 46, in start
self.device, epoch, self.recoder)
File "/home/jupyter/VAC_CSLR/seq_scripts.py", line 21, in seq_train
for batch_idx, data in enumerate(loader):
File "/opt/conda/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 521, in next
data = self._next_data()
File "/opt/conda/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 1203, in _next_data
return self._process_data(data)
File "/opt/conda/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 1229, in _process_data
data.reraise()
File "/opt/conda/lib/python3.7/site-packages/torch/_utils.py", line 434, in reraise
raise exception
IndexError: Caught IndexError in DataLoader worker process 0.
Original Traceback (most recent call last):
File "/opt/conda/lib/python3.7/site-packages/torch/utils/data/_utils/worker.py", line 287, in _worker_loop
data = fetcher.fetch(index)
File "/opt/conda/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 49, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/opt/conda/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 49, in
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/home/jupyter/VAC_CSLR/dataset/dataloader_video.py", line 47, in getitem
input_data, label = self.normalize(input_data, label)
File "/home/jupyter/VAC_CSLR/dataset/dataloader_video.py", line 78, in normalize
video, label = self.data_aug(video, label, file_id)
File "/home/jupyter/VAC_CSLR/utils/video_augmentation.py", line 24, in call
image = t(image)
File "/home/jupyter/VAC_CSLR/utils/video_augmentation.py", line 119, in call
if isinstance(clip[0], np.ndarray):
IndexError: list index out of range
Can you tell me what am I doing wrong?
The text was updated successfully, but these errors were encountered:
Aayush2007
changed the title
Getting IndexError while training
Getting IndexError while Training or Inference
Feb 1, 2022
This is the command I use: !python main.py --work-dir results --device 0 --num-worker 4 --batch-size 1
Here is the error that I get:
Traceback (most recent call last):
File "main.py", line 219, in
processor.start()
File "main.py", line 46, in start
self.device, epoch, self.recoder)
File "/home/jupyter/VAC_CSLR/seq_scripts.py", line 21, in seq_train
for batch_idx, data in enumerate(loader):
File "/opt/conda/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 521, in next
data = self._next_data()
File "/opt/conda/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 1203, in _next_data
return self._process_data(data)
File "/opt/conda/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 1229, in _process_data
data.reraise()
File "/opt/conda/lib/python3.7/site-packages/torch/_utils.py", line 434, in reraise
raise exception
IndexError: Caught IndexError in DataLoader worker process 0.
Original Traceback (most recent call last):
File "/opt/conda/lib/python3.7/site-packages/torch/utils/data/_utils/worker.py", line 287, in _worker_loop
data = fetcher.fetch(index)
File "/opt/conda/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 49, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/opt/conda/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 49, in
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/home/jupyter/VAC_CSLR/dataset/dataloader_video.py", line 47, in getitem
input_data, label = self.normalize(input_data, label)
File "/home/jupyter/VAC_CSLR/dataset/dataloader_video.py", line 78, in normalize
video, label = self.data_aug(video, label, file_id)
File "/home/jupyter/VAC_CSLR/utils/video_augmentation.py", line 24, in call
image = t(image)
File "/home/jupyter/VAC_CSLR/utils/video_augmentation.py", line 119, in call
if isinstance(clip[0], np.ndarray):
IndexError: list index out of range
Can you tell me what am I doing wrong?
The text was updated successfully, but these errors were encountered: