enums
Classes
AirTensorDim
AirSpatialPad
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.
-
PRELU(str) –Parametric ReLU activation.
Functions
compute_range
compute_range(output_zero_point: int, output_scale: float, *, dtype: DTypeLike | None = None, qmin: int | None = None, qmax: int | None = None, num_bits: int | None = None, signed: bool | None = None) -> tuple[int, int]
Compute quantized activation clamp range.
Precedence for the quantized range
1) dtype (e.g., np.int8 / np.uint8 / np.int16) 2) (num_bits, signed) (e.g., 4-bit signed) 3) qmin/qmax (explicit) 4) default to int8: [-128, 127]
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, *, dtype: DTypeLike | None = None, qmin: int | None = None, qmax: int | None = None, num_bits: int | None = None, signed: bool | None = None) -> tuple[int, int]
Compute quantized activation clamp range.
Precedence for the quantized range
1) dtype (e.g., np.int8 / np.uint8 / np.int16) 2) (num_bits, signed) (e.g., 4-bit signed) 3) qmin/qmax (explicit) 4) default to int8: [-128, 127]
AirComparisonType
AIR comparison operation types.
AirFullyConnectedWeightsFormat
AirOpType
AIR supported operator types.