Transpose

class Transpose(axes: IntArray) : Operation<Pair<FloatArray, TensorShape>, Pair<FloatArray, TensorShape>>

Reverse or permute the axes of an input tensor.

Constructors

Transpose
Link copied to clipboard
fun Transpose(axes: IntArray = intArrayOf(2, 0, 1))

Functions

apply
Link copied to clipboard
open override fun apply(input: Pair<FloatArray, TensorShape>): Pair<FloatArray, TensorShape>
getOutputShape
Link copied to clipboard
open override fun getOutputShape(inputShape: TensorShape): TensorShape

Properties

axes
Link copied to clipboard
var axes: IntArray

Array of ints, default value is related to the typical transpose task for H, W, C to C, W, H tensor format conversion.