depthwise_to_conv
Classes
DepthwiseToConvOptions
Options for the DepthwiseToConv transform.
DepthwiseToConv
The purpose of this transform is to convert DEPTHWISE_CONV_2D to CONV_2D operators when more efficient.
- Find any DEPTHWISE_CONV_2D operator that is convertible
- Transform to CONV_2D operator if threshold is met.
Functions
convert_operator
Convert the DEPTHWISE_CONV_2D operator to CONV_2D operator.
Parameters:
-
op
AirOperator
) –The DEPTHWISE_CONV_2D operator to convert.
-
model
AirModel
) –The AIR model
is_convertible
Check if the DEPTHWISE_CONV_2D operator is convertible.
Parameters:
-
op
AirOperator
) –The DEPTHWISE_CONV_2D operator to check.
-
model
AirModel
) –The AIR model
Returns:
-
bool
(bool
) –True if the operator is convertible, False otherwise.
is_efficient
Check if converting DEPTHWISE_CONV_2D operator is efficient.
Parameters:
-
op
AirOperator
) –The DEPTHWISE_CONV_2D operator to check.
-
model
AirModel
) –The AIR model
Returns:
-
bool
(bool
) –True if the operator is efficient to convert, False otherwise.