Transpose

class Transpose(axes: IntArray) : Preprocessor

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(data: FloatArray, inputShape: ImageShape): FloatArray

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.