Mojo function
transpose
transpose(input: Symbol, x: Int, y: Int) -> Symbol
Transposes two dimensions of a symbolic tensor.
Args:
- input (
Symbol
): The input symbolic tensor to transpose. - x (
Int
): One of the two dimensions to transpose. If negative, this indexes from the end of the tensor. For example,transpose(v, -1, -2)
transposes the last two dimensions. - y (
Int
): The other dimension to transpose. May also be negative to index from the end of the tensor.
Returns:
A new symbolic tensor with the two specified dimensions transposed. It has the same elements and dtype, but the order of the elements is different according to the transposition.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!
😔 What went wrong?