Skip to content

transpose

Classes

TransposeOperator

TransposeOperator(ident: int, op: OperatorT, model: ModelT, subgraph: SubGraphT, prefix: str = 'aot', attributes: dict[str, str] = {})

TRANSPOSE operator.

This operator transposes a tensor according to the specified permutation.

Parameters:

  • ident

    (int) –

    Operator identifier.

  • op

    (OperatorT) –

    Operator object from LiteRT model.

  • model

    (ModelT) –

    LiteRT model object.

  • subgraph

    (SubGraphT) –

    Subgraph object from LiteRT model.

  • prefix

    (str, default: 'aot' ) –

    Prefix for generated files. Defaults to "aot".

  • attributes

    (dict[str, str], default: {} ) –

    Attributes for template values. Defaults to {}.

Attributes

name property
name: str

Return the operator name.

input_indices property
input_indices: list[int]

Return the input tensor indices.

output_indices property
output_indices: list[int]

Return the output tensor indices.

input_tensors property
input_tensors: list[TensorT]

Return the input tensors.

output_tensors property
output_tensors: list[TensorT]

Return the output tensors.

Functions

compute_values
compute_values() -> dict[str, str]

Compute the values for the operator.

Returns:

  • dict[str, str]

    dict[str, str]: Computed values for the operator.

generate_source_code
generate_source_code(save_path: Path)

Generate the source code for the operator.

Parameters:

  • save_path
    (Path) –

    Path to save the generated code.

Functions