torch.shape 和torch.size() 输出结果相同。 x = torch.tensor([[0, 2],[3,4],[9,8]]) print(x.shape). 1; 2. 在这里插入图片描述
確定! 回上一頁