Skip to main content

ClikaRT::ops::transpose

function

transpose()

Tensor transpose(
    Tensor x,
    int64_t dim0,
    int64_t dim1
)

Swap dim0 and dim1, permute for exactly two dims. Returns a view (no copy).

Throws

  • ClikaRT::Error: (INVALID_ARGUMENT) when either dim is out of range (code_name() carries the reason).

Returns: a view of x with the two dims swapped.

Declared in ClikaRT/compute/ops.h, line 3289