Hi all,
I received the following error after transfering the net to the GPU. Things worked fine when the net is in CPU.
Since the (int, int) arguments are from pytorch internally. I wonder what I need to do to fix this. Should I simply go the the line and change

output.addmm_(0, 1, input, weight.t())

to

output.addmm_(0., 1., input, weight.t())

Thanks a lot for your help.

/home/nelson/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/nn/functions/linear.py in forward(self, input, weight, bias)
8         self.save_for_backward(input, weight, bias)
9         output = input.new(input.size(0), weight.size(0))
—> 10         output.addmm(0, 1, input, weight.t())
11         if bias is not None:
12             # cuBLAS doesn’t support 0 strides in sger, so we can’t use expand


TypeError: addmm_ received an invalid combination of arguments - got (int, int, torch.FloatTensor, torch.cuda.FloatTensor), but expected one of:

(torch.FloatTensor mat1, torch.FloatTensor mat2)
(torch.SparseFloatTensor mat1, torch.FloatTensor mat2)
(float beta, torch.FloatTensor mat1, torch.FloatTensor mat2)
(float alpha, torch.FloatTensor mat1, torch.FloatTensor mat2)
(float beta, torch.SparseFloatTensor mat1, torch.FloatTensor mat2)
(float alpha, torch.SparseFloatTensor mat1, torch.FloatTensor mat2)
(float beta, float alpha, torch.FloatTensor mat1, torch.FloatTensor mat2)
(float beta, float alpha, torch.SparseFloatTensor mat1, torch.FloatTensor mat2)