epic-kitchens / epic-kitchens-slowfast

Other
28 stars 15 forks source link

'str' object has no attribute 'cuda' #8

Closed caiocvsilva closed 2 years ago

caiocvsilva commented 2 years ago

When running the training configuration with Epic-Kitchen annotation and dataset following the structure in the ReadMe, I got this error:

` Traceback (most recent call last): File "tools/run_net.py", line 151, in main() File "tools/run_net.py", line 126, in main train(cfg=cfg) File "/home/caio/epic-kitchens-slowfast/tools/train_net.py", line 433, in train train_epoch(train_loader, model, optimizer, train_meter, cur_epoch, cfg) File "/home/caio/epic-kitchens-slowfast/tools/train_net.py", line 62, in train_epoch val[i] = val[i].cuda(non_blocking=True) AttributeError: 'str' object has no attribute 'cuda' `

This is the command used: ` python tools/run_net.py --cfg configs/EPIC-KITCHENS/SLOWFAST_8x8_R50.yaml NUM_GPUS 1 OUTPUT_DIR ./output_epic EPICKITCHENS.VISUAL_DATA_DIR ~/path_to_epic_data EPICKITCHENS.ANNOTATIONS_DIR ~/epic-kitchens-100-annotations `

It comes from this part of the code: Screenshot from 2021-11-03 19-24-33

ekazakos commented 2 years ago

Hi,

Thanks for spotting this! I fixed the bug and should be ok now. Please pull the new changes. And let me know if you are having any other issues!