transpose(dimensions:source:)
Adds a new transpose layer to the graph using the dimensions and source tensor you specify.
Declaration
func transpose(dimensions: [Int], source: MLCTensor) -> MLCTensor?Parameters
- dimensions:
An array that contains the desired ordering of dimensions.
- source:
The source tensor.
Return Value
A result tensor.
Discussion
The dimensions array specifies the input axis source for each output axis. In other words, the nth element in the dimensions array specifies the input axis source for the nth axis in the output.