a = torch.ones(5) print(a). 输出 tensor([1., 1. ... b = a.numpy() print(b) ... [开发技巧]·PyTorch中Numpy,Tensor与Variable深入理解与转换技巧.
確定! 回上一頁