import torch a = torch.ones([1,2]) b = torch.ones([1,2]) torch.cat([a,b],1) 1 1 1 1 [torch.FloatTensor of size 1x4]