Solved by JuanFMontesinos in post #2 
              
              
                [x, x**2]
Out[4]:
 [tensor([1, 2, 3]), tensor([1, 4, 9])]

You cannot convert that into a tensor. You need to use torch.cat or torch.stack depending on how do you want to convert it.