okay, I am going to cry now.
Then how to include multiple gpu’s in this code, like in the following way-
device_id = torch.cuda.device_count()
if torch.cuda.device_count() == 1:
   model = model.to("cuda:{}".format(0))
elif torch.cuda.device_count ==2:
   model = nn.DataParallel(model)
   model = model.to("cuda:{}".format(1))


But it isn’t too much hard-coded way to do things?