I can not distribute the model to multiple specified gpus suppose I pass 1,2,3,4 from args.
Colud you pls help me on this ?
Thanks
use_cuda = torch.cuda.is_available()
if use_cuda:
     gpu_ids = list(map(int, args.gpu_ids.split(',')))
     cuda='cuda:'+ str(gpu_ids[0])
     model = DataParallel(model,device_ids=gpu_ids)

device= torch.device(cuda if use_cuda else 'cpu')
model.to(device)