Hi.
I’m trying to use GPU with my code. This is the code about cuda.
model = model.cuda()
model = nn.DataParallel(model, device_ids=range(torch.cuda.device_count)))

But I get RuntimeError: module mush have its paraeters and buffers on device cuda:0 (device_ids[0]) but found one of them on device:cpu this error.
My Pytorch already know that I have GPU on my computer. I checked it with this code.
>>> import torch
>>> torch.cuda.device_cound()
1