transpose_reverse_conv
Classes
TransposeReverseConvOptions
Options for the TransposeReverseConv transform.
TransposeReverseConv
The purpose of this transform is to convert TRANSPOSE_CONV to CONV_2D operators when possible and efficient.
- Find any TRANSPOSE_CONV operator that is reversible
- Transform to CONV_2D operator if threshold is met.
Functions
convert_operator
Convert the TRANSPOSE_CONV operator to CONV_2D operator.
Parameters:
-
(opAirOperator) –The TRANSPOSE_CONV operator to convert.
-
(modelAirModel) –The AIR model
is_reversible
Check if the TRANSPOSE_CONV operator is reversible.
Parameters:
-
(opAirOperator) –The TRANSPOSE_CONV operator to check.
-
(modelAirModel) –The AIR model
Returns:
-
bool(bool) –True if the operator is reversible, False otherwise.
is_float
Whether the operator produces a float (f16/f32) output.
Float transpose-convolution must keep its native
arm_transpose_conv_f32/_f16 lowering: rewriting it to a plain
CONV_2D would encode the stride upscaling as upscale_height/width,
which the CMSIS-NN float convolution kernels do not support and would
silently drop. Only quantized (s8) transpose-convs, whose CONV_2D path
honours the arm_convolve_s8 upscale argument, are eligible.
Parameters:
-
(opAirOperator) –The operator to inspect.
-
(modelAirModel) –The AIR model.
Returns:
is_efficient
Check if the TRANSPOSE_CONV operator is efficient to convert.
Parameters:
-
(opAirOperator) –The TRANSPOSE_CONV operator to check.
-
(modelAirModel) –The AIR model
Returns:
-
bool(bool) –True if the operator is efficient to convert, False otherwise.