NVIDIA / semantic-segmentation

Nvidia Semantic Segmentation monorepo
BSD 3-Clause "New" or "Revised" License
1.76k stars 388 forks source link

AttributeError: module 'torch._C' has no attribute '_cuda_setDevice' #115

Open s0min-park opened 3 years ago

s0min-park commented 3 years ago

Dear authors, thank you for sharing your code.

I have been following your direction to run model with Cityscape datasets and faced with "AttributeError: module 'torch._C' has no attribute '_cuda_setDevice'".

It is in File "train.py", line 298, in torch.cuda.set_device(args.local_rank)

After searching about the issue, I guess I should edit command not to use GPU or something, but I am not sure how to do that. Thank you very much.

karansapra commented 3 years ago

Are you running it on cpu ?

the-joy-of-data commented 3 years ago

I believe you can change the hardcoded parameter in L3 of the yml scripts, for example, L3 of eval_cityscapes.yml. I set it to 4 to use all 4 GPUs I have.

Screenshot 2021-02-17 at 18 28 15

However, a follow up question I have is, is there a way we can specify the gpu ids we would like to use? is this something we can configure here?

L112: train.py

Screenshot 2021-02-17 at 18 30 13