torch.Tensor.transpose_ — PyTorch 1.10.1 documentation
pytorch.org › torchLearn about PyTorch’s features and capabilities. Community. Join the PyTorch developer community to contribute, learn, and get your questions answered. Developer Resources. Find resources and get questions answered. Forums. A place to discuss PyTorch code, issues, install, research. Models (Beta) Discover, publish, and reuse pre-trained models
pytorch中的transpose方法(函数)_a250225的博客-CSDN博客_pytorch t...
blog.csdn.net › a250225 › articleOct 19, 2019 · torch.transpose (): torch.transpose(input, dim0, dim1) → Tensor 1 Returns a tensor that is a transposed version of input. The given dimensions dim0 and dim1 are swapped. The resulting out tensor shares it’s underlying storage with the input tensor, so changing the content of one would change the content of the other. 第二条是说输出和输入是共享一块内存的,所以两者同时改变。