Hi,
I’m new in PyTorch and I have the same exactly the problem using the concatenate function.
My both variables padding and source are “torch.LongTensor”
Probably I’m doing something wrong. So this is my code:
padding = torch.LongTensor(np.zeros(args.distance_context, dtype=np.int))
sequence = torch.cat([padding, source[i:seq_len+1]],dim=0)

TypeError: cat received an invalid combination of arguments - got (list, dim=int), but expected one of:

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

Did you solve this problem ?
Thanks you very much !