Package ej.microai
Class Tensor.QuantizationParameters
- java.lang.Object
-
- ej.microai.Tensor.QuantizationParameters
-
- Enclosing class:
- Tensor
public static class Tensor.QuantizationParameters extends java.lang.ObjectTheQuantizationParametersclass represents the quantization parameters used by aMLInferenceEngine.scaleandzeroPointvalues are0when the tensor is not quantized.Real values can be quantized using:
quantized_value = real_value/scale + zero_point.Quantized values can be converted back to float using:
real_value = scale * (quantized_value - zero_point).
-
-
Constructor Summary
Constructors Constructor Description QuantizationParameters(int zeroPoint, float scale)Creates an instance of QuantizationParameters.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description floatgetScale()Gets the scale value of the quantization parameters.intgetZeroPoint()Gets the zero point value of the quantization parameters.
-
-
-
Method Detail
-
getScale
public float getScale()
Gets the scale value of the quantization parameters.- Returns:
- the scale value of the quantization parameters.
-
getZeroPoint
public int getZeroPoint()
Gets the zero point value of the quantization parameters.- Returns:
- the zero point value of the quantization parameters.
-
-