import torch value = torch.Tensor([1, 2, 3]) print("list:", value.tolist())
得到:list: [1.0, 2.0, 3.0]
list: [1.0, 2.0, 3.0]