daitao / SAN

Second-order Attention Network for Single Image Super-resolution (CVPR-2019)
550 stars 106 forks source link

AssertionError: Invalid device id #45

Open Akshaypatil7 opened 3 years ago

Akshaypatil7 commented 3 years ago

Hi Everyone, I am getting an error AssertionError: Invalid device id, when i set --n_GPUs to 2 (args.n_GPUs to 2). can anyone help me. I am getting error at this line(Line number 29) in model/init.py self.model = nn.DataParallel(self.model, range(args.n_GPUs)) I tried nvidia-smi , it is showing 2 gpus also i tried, torch.cuda.device_count() it shows 2