Tensor.permute()

Reshaping

Rearrange the dimensions (axes) of a tensor.

Reorder the axes of the tensor. For a 3D tensor with shape [A, B, C], permute(2, 0, 1) gives shape [C, A, B].

Python
Shift+Enter to run
1
2
3
4
5
6
Step 0 / 0
Speed

Write Python code and press Shift+Enter or click "Run" to visualize.

Run the operation to see step-by-step explanation.