I’m facing the similiar problem using pytorch 0.3.1.
When invoking torch.cat(hidden,encoder_outputs)
hidden type : [torch.cuda.FloatTensor of size 32x90x512 (GPU 0)]
encoder_outputs type: [torch.cuda.FloatTensor of size 32x90x512 (GPU 0)]
Traceback (most recent call last):
File “/home/yb/project/crnn.pytorch-master/crnn_att_main.py”, line 365, in 
cost = trainBatch(crnn,  optimizer)
File “/home/yb/project/crnn.pytorch-master/crnn_att_main.py”, line 340, in trainBatch
preds = crnn(image,batch_label_tensor)  #44X3X7
File “/ENTER/lib/python2.7/site-packages/torch/nn/modules/module.py”, line 357, in call
result = self.forward(*input, **kwargs)
File “/ENTER/lib/python2.7/site-packages/torch/nn/parallel/data_parallel.py”, line 71, in forward
return self.module(*inputs[0], **kwargs[0])
File “/ENTER/lib/python2.7/site-packages/torch/nn/modules/module.py”, line 357, in call
result = self.forward(*input, **kwargs)
File “/home/yb/project/crnn.pytorch-master/models/crnn_att.py”, line 201, in forward
output, hidden, encoder_outputs)
File “/ENTER/lib/python2.7/site-packages/torch/nn/modules/module.py”, line 357, in call
result = self.forward(*input, **kwargs)
File “/home/yb/project/crnn.pytorch-master/models/crnn_att.py”, line 39, in forward
rnn_input = torch.cat([embedded, context.data], 2)
TypeError: cat received an invalid combination of arguments - got (list, int), but expected one of:

(sequence[torch.FloatTensor] seq)
(sequence[torch.FloatTensor] seq, int dim)
didn’t match because some of the arguments have invalid types: (list, int)

So the problem is that the two input tensors are both cuda.FloatTensor, but it’s not the expected type.
Could you please give some advice on how to use cat func for cuda.FloatTensor