torch concat 1D to a 2D tensor
I have a issue on concat 2 tensor,
say I have x and y:
x = torch.randn(35, 50)
y = torch.randn(35)

How do I concat every y value in to x[0] to make x has a shape 35,51?
I tried:
for i in y:
    for a in range(x.shape[0]):
        x[a] = torch.cat((x[a],i),0)

Still getting shape error. Any smart way of doing it?

This should work:
z = torch.cat([x,y.reshape(-1,1)], axis=1)
print(z.shape)

Output:
torch.Size([35, 51])

