把 numpy 類型的數據先轉換爲 tensor 類型,就和torch repeat 一樣了。 >>> w=np.random.randn(1,2) >>> w=torch.tensor(w) >>> w tensor([[ 0.8654, ...
確定! 回上一頁