Solved by a_d in post #2 
              
              
                Hello 
you could use torch.stack 
If tensor_list is the list of the tensors you obtain after the loop then - 
desired_tensor = torch.stack(tensor_list, dim=0)