Contents

transposeTensor(_:dimension:withDimension:name:)

Creates a transpose operation and returns the result tensor.

Declaration

func transposeTensor(_ tensor: MPSGraphTensor, dimension dimensionIndex: Int, withDimension dimensionIndex2: Int, name: String?) -> MPSGraphTensor

Parameters

  • tensor:

    The tensor to be transposed.

  • dimensionIndex:

    The first dimension index to be transposed.

  • dimensionIndex2:

    The second dimension index to be transposed.

  • name:

    The name for the operation.

Return Value

A valid MPSGraphTensor object.

Discussion

Transposes the dimensions dimensionIndex and dimensionIndex2 of the input tensor.