Skip to content

tranpose_reverse_conv

Classes

TransposeReverseConvOptions

Options for the TransposeReverseConv transform.

TransposeReverseConv

TransposeReverseConv(enabled: bool = True, options: dict[str, Any] = None)

The purpose of this transform is to convert TRANSPOSE_CONV to CONV_2D operators when possible and efficient.

  1. Find any TRANSPOSE_CONV operator that is reversible
  2. Transform to CONV_2D operator if threshold is met.

Functions

convert_operator
convert_operator(op: AirOperator, model: AirModel)

Convert the TRANSPOSE_CONV operator to CONV_2D operator.

Parameters:

  • op
    (AirOperator) –

    The TRANSPOSE_CONV operator to convert.

  • model
    (AirModel) –

    The AIR model

is_reversible
is_reversible(op: AirOperator, model: AirModel) -> bool

Check if the TRANSPOSE_CONV operator is reversible.

Parameters:

  • op
    (AirOperator) –

    The TRANSPOSE_CONV operator to check.

  • model
    (AirModel) –

    The AIR model

Returns:

  • bool ( bool ) –

    True if the operator is reversible, False otherwise.

is_efficient
is_efficient(op: AirOperator, model: AirModel) -> bool

Check if the TRANSPOSE_CONV operator is efficient to convert.

Parameters:

  • op
    (AirOperator) –

    The TRANSPOSE_CONV operator to check.

  • model
    (AirModel) –

    The AIR model

Returns:

  • bool ( bool ) –

    True if the operator is efficient to convert, False otherwise.

apply
apply(model: AirModel) -> AirModel

Apply the transform.

Parameters:

  • model
    (AirModel) –

    The model to transform.

Returns:

  • AirModel ( AirModel ) –

    The transformed model.

Functions