enums
Classes
AirTensorDim
AirPaddingType
AirTensorType
AIR tensor data types.
AirActivationType
AIR activation function types.
Attributes:
-
NONE
(str
) –No activation.
-
RELU
(str
) –ReLU activation.
-
RELU_N1_TO_1
(str
) –ReLU activation with range [-1, 1].
-
RELU_0_TO_1
(str
) –ReLU activation with range [0, 1].
-
RELU6
(str
) –ReLU activation with range [0, 6].
-
TANH
(str
) –Tanh activation.
-
SIGN_BIT
(str
) –Sign bit activation.
Functions
compute_range
compute_range(output_zero_point: int, output_scale: float, qmin: int = -128, qmax: int = 127) -> tuple[int, int]
Compute the activation min and max values
Parameters:
-
output_zero_point
int
) –The zero point for the output tensor.
-
output_scale
float
) –The scale for the output tensor.
-
qmin
int
, default:-128
) –Minimum quantized value. Defaults to -128.
-
qmax
int
, default:127
) –Maximum quantized value. Defaults to 127.
Returns:
AirTensorKind
AirReluType
AIR RELU types.
Attributes:
-
RELU
(str
) –ReLU activation.
-
RELU6
(str
) –ReLU6 activation.
-
RELU_N1_TO_1
(str
) –ReLU activation with range [-1, 1].
-
RELU_0_TO_1
(str
) –ReLU activation with range [0, 1].
Functions
compute_range
compute_range(output_zero_point: int, output_scale: float, qmin: int = -128, qmax: int = 127) -> tuple[int, int]
Compute the activation min and max values
Parameters:
-
output_zero_point
int
) –The zero point for the output tensor.
-
output_scale
float
) –The scale for the output tensor.
-
qmin
int
, default:-128
) –Minimum quantized value. Defaults to -128.
-
qmax
int
, default:127
) –Maximum quantized value. Defaults to 127.
Returns:
AirFullyConnectedWeightsFormat
AirOpType
AIR supported operator types.