# Tensor.QuantizationParams

```
class Tensor.QuantizationParams
```

*** ** * ** ***

Quantization parameters that corresponds to the table, `QuantizationParameters`, in the [TFLite Model schema file.](https://github.com/tensorflow/tensorflow/blob/master/tensorflow/lite/schema/schema.fbs)

Since per-channel quantization does not apply to input and output tensors, `scale` and `zero_point` are both single values instead of arrays.

For tensor that are not quantized, the values of scale and zero_point are both 0.

Given a quantized value q, the corresponding float value f should be: f = scale \* (q - zero_point)

## Summary

| ### Public constructors |
|---|
| `https://developers.google.com/edge/api/litert/kotlin/org/tensorflow/lite/Tensor.QuantizationParams#QuantizationParams(float,int)(scale: https://developers.google.com/edge/api/litert/kotlin/kotlin/Float, zeroPoint: https://developers.google.com/edge/api/litert/kotlin/kotlin/Int)` Creates a `https://developers.google.com/edge/api/litert/kotlin/org/tensorflow/lite/Tensor.QuantizationParams` with `scale` and `zero_point`. |

| ### Public properties |
|---|---|
| `https://developers.google.com/edge/api/litert/kotlin/kotlin/Float` | `https://developers.google.com/edge/api/litert/kotlin/org/tensorflow/lite/Tensor.QuantizationParams#scale()` The scale value used in quantization. |
| `https://developers.google.com/edge/api/litert/kotlin/kotlin/Int` | `https://developers.google.com/edge/api/litert/kotlin/org/tensorflow/lite/Tensor.QuantizationParams#zeroPoint()` The zero point value used in quantization. |

## Public constructors

### QuantizationParams

```
QuantizationParams(scale: Float, zeroPoint: Int)
```

Creates a `https://developers.google.com/edge/api/litert/kotlin/org/tensorflow/lite/Tensor.QuantizationParams` with `scale` and `zero_point`.

| Parameters |
|---|---|
| `scale: https://developers.google.com/edge/api/litert/kotlin/kotlin/Float` | The scale value used in quantization. |
| `zeroPoint: https://developers.google.com/edge/api/litert/kotlin/kotlin/Int` | The zero point value used in quantization. |

## Public properties

### scale

```
val scale: Float
```

The scale value used in quantization.

### zeroPoint

```
val zeroPoint: Int
```

The zero point value used in quantization.