How to join two tensors
I have two tensors of dimension [3,1]. I need to join them as a [3,2] tensor.
t = torch.tensor([[3.],[1],[2]], requires_grad=True)
x = torch.tensor([[1.],[4],[5]], requires_grad=True)

I tried torch.cat and torch.stack but neither work for me.

With cat you need to specify the dimension the tensors are concatenated along. By default this is 0, but you wish to use 1:
import torch
res = torch.cat([t,x], axis=1)

