If you have a numpy array and want to avoid a copy, use torch.as_tensor() . ... To create a tensor with the same size (and similar types) as another tensor, ...
確定! 回上一頁