[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-05-10 UTC."],[],[],null,["# Tensor.QuantizationParams\n\npublic static class **Tensor.QuantizationParams** \nQuantization parameters that corresponds to the table, `QuantizationParameters`, in the\n[TFLite\nModel schema file.](https://github.com/tensorflow/tensorflow/blob/master/tensorflow/lite/schema/schema.fbs)\n\nSince per-channel quantization does not apply to input and output tensors, `scale` and\n`zero_point` are both single values instead of arrays.\n\nFor tensor that are not quantized, the values of scale and zero_point are both 0.\n\nGiven a quantized value q, the corresponding float value f should be: \n\nf = scale \\* (q - zero_point) \n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n### Public Constructors\n\n|---|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| | [QuantizationParams](/edge/api/tflite/java/org/tensorflow/lite/Tensor.QuantizationParams#QuantizationParams(float,%20int))(float scale, int zeroPoint) Creates a [Tensor.QuantizationParams](/edge/api/tflite/java/org/tensorflow/lite/Tensor.QuantizationParams) with `scale` and `zero_point`. |\n\n### Public Methods\n\n|-------|------------------------------------------------------------------------------------------------------------------------------------|\n| float | [getScale](/edge/api/tflite/java/org/tensorflow/lite/Tensor.QuantizationParams#getScale())() Returns the scale value. |\n| int | [getZeroPoint](/edge/api/tflite/java/org/tensorflow/lite/Tensor.QuantizationParams#getZeroPoint())() Returns the zero point value. |\n\n### Inherited Methods\n\nFrom class java.lang.Object \n\n|----------------------------------------------------------------------------------|--------------------------------------------------------------------------------------|\n| boolean | equals([Object](https://developer.android.com/reference/java/lang/Object.html) arg0) |\n| final [Class](https://developer.android.com/reference/java/lang/Class.html)\\\u003c?\\\u003e | getClass() |\n| int | hashCode() |\n| final void | notify() |\n| final void | notifyAll() |\n| [String](https://developer.android.com/reference/java/lang/String.html) | toString() |\n| final void | wait(long arg0, int arg1) |\n| final void | wait(long arg0) |\n| final void | wait() |\n\nPublic Constructors\n-------------------\n\n#### public\n**QuantizationParams**\n(float scale, int zeroPoint)\n\nCreates a [Tensor.QuantizationParams](/edge/api/tflite/java/org/tensorflow/lite/Tensor.QuantizationParams) with `scale` and `zero_point`. \n\n##### Parameters\n\n| scale | The scale value used in quantization. |\n| zeroPoint | The zero point value used in quantization. |\n|-----------|--------------------------------------------|\n\nPublic Methods\n--------------\n\n#### public float\n**getScale**\n()\n\nReturns the scale value. \n\n#### public int\n**getZeroPoint**\n()\n\nReturns the zero point value."]]