同时我们也可以使用下面的方法将pytorch tensor 转换为numpy ndarray ... x = x.squeeze() # 将tensor 中所有的一维全部都去掉 print(x.shape) torch.Size([4, 3])
確定! 回上一頁