Traceback (most recent call last):
File "11_3_hello_rnn_gpu.py", line 83, in <module>
outputs = rnn(inputs)
File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py", line 224, in __call__
result = self.forward(*input, **kwargs)
File "11_3_hello_rnn_gpu.py", line 65, in forward
out, _ = self.rnn(x, h_0)
File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py", line 224, in __call__
result = self.forward(*input, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/rnn.py", line 162, in forward
output, hidden = func(input, self.all_weights, hx)
File "/usr/local/lib/python3.6/dist-packages/torch/nn/_functions/rnn.py", line 351, in forward
return func(input, *fargs, **fkwargs)
File "/usr/local/lib/python3.6/dist-packages/torch/nn/_functions/rnn.py", line 244, in forward
nexth, output = func(input, hidden, weight)
File "/usr/local/lib/python3.6/dist-packages/torch/nn/_functions/rnn.py", line 84, in forward
hy, output = inner(input, hidden[l], weight[l])
File "/usr/local/lib/python3.6/dist-packages/torch/nn/_functions/rnn.py", line 113, in forward
hidden = inner(input[i], hidden, *weight)
File "/usr/local/lib/python3.6/dist-packages/torch/nn/_functions/rnn.py", line 19, in RNNTanhCell
hy = F.tanh(F.linear(input, w_ih, b_ih) + F.linear(hidden, w_hh, b_hh))
File "/usr/local/lib/python3.6/dist-packages/torch/nn/functional.py", line 553, in linear
return torch.addmm(bias, input, weight.t())
File "/usr/local/lib/python3.6/dist-packages/torch/autograd/variable.py", line 924, in addmm
return cls._blas(Addmm, args, False)
File "/usr/local/lib/python3.6/dist-packages/torch/autograd/variable.py", line 920, in _blas
return cls.apply(*(tensors + (alpha, beta, inplace)))
File "/usr/local/lib/python3.6/dist-packages/torch/autograd/_functions/blas.py", line 26, in forward
matrix1, matrix2, out=output)
TypeError: torch.addmm received an invalid combination of arguments - got (int, torch.cuda.FloatTensor, int, torch.FloatTensor, torch.cuda.FloatTensor, out=torch.cuda.FloatTensor), but expected one of:
* (torch.cuda.FloatTensor source, torch.cuda.FloatTensor mat1, torch.cuda.FloatTensor mat2, *, torch.cuda.FloatTensor out)
* (torch.cuda.FloatTensor source, torch.cuda.sparse.FloatTensor mat1, torch.cuda.FloatTensor mat2, *, torch.cuda.FloatTensor out)
* (float beta, torch.cuda.FloatTensor source, torch.cuda.FloatTensor mat1, torch.cuda.FloatTensor mat2, *, torch.cuda.FloatTensor out)
* (torch.cuda.FloatTensor source, float alpha, torch.cuda.FloatTensor mat1, torch.cuda.FloatTensor mat2, *, torch.cuda.FloatTensor out)
* (float beta, torch.cuda.FloatTensor source, torch.cuda.sparse.FloatTensor mat1, torch.cuda.FloatTensor mat2, *, torch.cuda.FloatTensor out)
* (torch.cuda.FloatTensor source, float alpha, torch.cuda.sparse.FloatTensor mat1, torch.cuda.FloatTensor mat2, *, torch.cuda.FloatTensor out)
* (float beta, torch.cuda.FloatTensor source, float alpha, torch.cuda.FloatTensor mat1, torch.cuda.FloatTensor mat2, *, torch.cuda.FloatTensor out)
didn't match because some of the arguments have invalid types: (int, torch.cuda.FloatTensor, int, !torch.FloatTensor!, torch.cuda.FloatTensor, out=torch.cuda.FloatTensor)
* (float beta, torch.cuda.FloatTensor source, float alpha, torch.cuda.sparse.FloatTensor mat1, torch.cuda.FloatTensor mat2, *, torch.cuda.FloatTensor out)
didn't match because some of the arguments have invalid types: (int, torch.cuda.FloatTensor, int, !torch.FloatTensor!, torch.cuda.FloatTensor, out=torch.cuda.FloatTensor)