可以通过下面两种方式得到tensor 的大小 print(pytorch_tensor1.shape) print(pytorch_tensor1.size()) torch.Size([10, 20]) torch.Size([10, 20])
確定! 回上一頁