与torch.expand不同的是torch.repeat返回的张量在内存中是连续的。 例子1:. 将张量横向的复制. import torch x = torch.tensor([1, 2, 3]) xnew ...
確定! 回上一頁