torch. permute — PyTorch 2. 11 documentation torch permute # torch permute(input, dims) → Tensor # Returns a view of the original tensor input with its dimensions permuted Parameters: input (Tensor) – the input tensor dims (torch Size, tuple of int or list of int) – the desired ordering of dimensions Example
torch. permute — PyTorch 2. 11 文档 - PyTorch 文档 torch permute(input, dims) → Tensor # 返回原始张量 input 维度置换后的视图。 参数: input (Tensor) – 输入张量。 dims (torch Size, tuple of int or list of int) – 所需的维度顺序。 示例 >>> x = torch randn(2, 3, 5) >>> x size() torch Size([2, 3, 5]) >>> torch permute(x, (2, 0, 1)) size() torch Size([5, 2, 3])
permute - 网易有道 Permute In mathematics, the notion of permutation relates to the act of rearranging, or permuting, all the members of a set into some sequence or order (unlike combinations, which are selections of some members of the set where order is disregarded)