Action-Recognition icon indicating copy to clipboard operation
Action-Recognition copied to clipboard

Train issue

Open rebotnix opened this issue 5 years ago • 4 comments

This project is really interesting.

I tried to train the model, but i always get a random list index out of range error during the training phase.

I used torch 1.2 till 1.3.1, cuda 10.1, always the same error.

Anyone has an idea how to fix that?

python3 train.py --dataset_path data/UCF-101-frames/ --split_path data/ucfTrainTestlist --num_epochs 200 --sequence_length 20 --img_dim 112 --latent_dim 512 --batch_size 64 Namespace(batch_size=64, channels=3, checkpoint_interval=5, checkpoint_model='', dataset_path='data/UCF-101-frames/', img_dim=112, latent_dim=512, num_epochs=200, sequence_length=20, split_number=1, split_path='data/ucfTrainTestlist') cuda --- Epoch 0 --- [Epoch 0/200] [Batch 22/150] [Loss: 4.612639 (4.613988), Acc: 4.69% (2.31%)] ETA: 8:49:23.620145Traceback (most recent call last): File "train.py", line 116, in for batch_i, (X, y) in enumerate(train_dataloader): File "/home/gary/.local/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 801, in next return self._process_data(data) File "/home/gary/.local/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 846, in _process_data data.reraise() File "/home/gary/.local/lib/python3.6/site-packages/torch/_utils.py", line 385, in reraise raise self.exc_type(msg) IndexError: Caught IndexError in DataLoader worker process 3. Original Traceback (most recent call last): File "/home/gary/.local/lib/python3.6/site-packages/torch/utils/data/_utils/worker.py", line 178, in _worker_loop data = fetcher.fetch(index) File "/home/gary/.local/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/gary/.local/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 "/opt/4tbdrive1/experiments/Action-Recognition/dataset.py", line 83, in getitem image_paths = self._pad_to_length(image_paths) File "/opt/4tbdrive1/experiments/Action-Recognition/dataset.py", line 67, in _pad_to_length left_pad = sequence[0] IndexError: list index out of range

rebotnix avatar Dec 07 '19 13:12 rebotnix

Same error as @rebotnix

pcshih avatar Jan 09 '20 07:01 pcshih

I do the vacant frame check

video_frame_paths = glob.glob(os.path.join(opt.dataset_frames_path, "*", "*")) for i, video_frame_path in enumerate(video_frame_paths): video_frame_len = len(glob.glob(os.path.join(video_frame_path, "*"))) if(video_frame_len==0): print(i, video_frame_path) and extract frames again

pcshih avatar Jan 09 '20 12:01 pcshih

@pcshih I have the same error. Which file have you made the changes to?

Soumi7 avatar Jul 16 '20 13:07 Soumi7

same error, have you solved the error yet? @rebotnix @pcshih

key-cc avatar Sep 06 '22 21:09 key-cc