TensorPlay
latest (dev)
Copy
View Markdown

Latest development documentation · Updated 2026-10-15

tensorplay.functional.permute

tensorplay.functional.permute(input, dims) → Tensor[source]

Returns a view of the original tensor input with its dimensions permuted.

Parameters:
  • input (Tensor) – the input tensor.

  • dims (tuple of int) – The desired ordering of dimensions

Example

>>> x = tensorplay.randn(2, 3, 5)
>>> x.size()
tensorplay.Size([2, 3, 5])
>>> tensorplay.permute(x, (2, 0, 1)).size()
tensorplay.Size([5, 2, 3])

On this page

Ask DeepWiki