建立張量的方式,我們可以直接使用torch.tensor 的方式來建立,可以在 dtype 中 ... t1 = torch.tensor(1, dtype=torch.int16) ... 3維tensor (n-dimensional array).
確定! 回上一頁