📅  最后修改于: 2022-03-11 14:46:09.122000             🧑  作者: Mango
代码示例2
l = list(torch.tensor([1,2,3]))
print(l)
>>>[tensor(1), tensor(2), tensor(3)]
k = torch.stack(l)
print(k)
>>>tensor([1, 2, 3])