usage: train.py [-h] [--config CONFIG] [--eval_only EVAL_ONLY]
[--resume RESUME] [--gpus GPUS] [--optimizer OPTIMIZER]
PyTorch Jester Training using JPEG
optional arguments:
-h, --help show this help message and exit
--config CONFIG, -c CONFIG
json config file path
--eval_only EVAL_ONLY, -e EVAL_ONLY
evaluate trained model on validation data.
--resume RESUME, -r RESUME
resume training from given checkpoint.
--gpus GPUS, -g GPUS gpu ids for use.
--optimizer OPTIMIZER, -o OPTIMIZER
optimizer of choice
Can you give me some?
Traceback (most recent call last):
File "E:/3dcnn/hdd/train.py", line 345, in
main()
File "E:/3dcnn/hdd/train.py", line 198, in main
train_loss, train_top1, train_top5 = train( train_loader, model, criterion, optimizer, epoch)
File "E:/3dcnn/hdd/train.py", line 230, in train
for i, (input, target) in enumerate(train_loader):
File "D:\python3\lib\site-packages\torch\utils\data\dataloader.py", line 336, in next
return self._process_next_batch(batch)
File "D:\python3\lib\site-packages\torch\utils\data\dataloader.py", line 357, in _process_next_batch
raise batch.exc_type(batch.exc_msg)
IndexError: Traceback (most recent call last):
File "D:\python3\lib\site-packages\torch\utils\data\dataloader.py", line 106, in _worker_loop
samples = collate_fn([dataset[i] for i in batch_indices])
File "D:\python3\lib\site-packages\torch\utils\data\dataloader.py", line 106, in
samples = collate_fn([dataset[i] for i in batch_indices])
File "E:\3dcnn\hdd\data_loader.py", line 38, in getitem
img_paths = self.get_frame_names(item.path)
File "E:\3dcnn\hdd\data_loader.py", line 73, in get_frame_names
frame_names += [frame_names[-1]] * (num_frames_necessary - num_frames)
IndexError: list index out of range
For those whose os is windows, replace
frame_names.extend(glob.glob(os.path.join(path, "*" + ext)))
to
frame_names.extend(glob.glob(path + "/*" + ext))
in data_loader.py's line 59 and line 123.
Also, replace
"train_data_folder": "/20bn-jester-v1/",
"val_data_folder": "/20bn-jester-v1/",
to
"train_data_folder": "20bn-jester-v1",
"val_data_folder": "20bn-jester-v1",
in config.json's line 5 and line 6.