Hello! I am trying to transfer a model to GPU as shown below:
net = TripletNet(resnet101())
net = torch.nn.DataParallel(net).to(torch.device('cuda:0'))

During training, when I run
print(next(net.parameters()).is_cuda) I get False. Why does it happen? How can I transfer the model to GPU?
Note: when I try to transfer the data to the GPU, it works:
data1 = data1.cuda()
print(data1.is_cuda)
The above two lines of code yields True