Swap axes in pytorch? - PyTorch Forums
discuss.pytorch.org › t › swap-axes-in-pytorchMar 09, 2017 · apaszke (Adam Paszke) March 9, 2017, 1:14pm #2. No, we only support NCHW format. You can use .permute to swap the axis. 22 Likes. Response777 March 9, 2017, 1:18pm #3. Thanks, I have just checked the Docs, but it seems that I just miss it…. fmassa (Francisco Massa) March 9, 2017, 2:37pm #5. @Veril transpose only applies to 2 axis, while ...
torch.transpose — PyTorch 1.10.1 documentation
pytorch.org › generated › torchtorch.transpose. torch.transpose(input, dim0, dim1) → Tensor. Returns a tensor that is a transposed version of input . The given dimensions dim0 and dim1 are swapped. The resulting out tensor shares its underlying storage with the input tensor, so changing the content of one would change the content of the other.