torch.tensor 是PyTorch 最核心的data type。 ... x = torch.tensor([[1, 2, 3], [4, 5, 6], [7, 8, 9]], dtype=torch.float) >>> x ... x.unsqueeze(0).shape torch.
確定! 回上一頁