# tfc.ops.pmf_to_quantized_cdf

<br />

Converts a PMF into a quantized CDF for range coding.

#### View aliases


**Main aliases**

[`tfc.pmf_to_quantized_cdf`](https://www.tensorflow.org/api_docs/python/tfc/ops/pmf_to_quantized_cdf)

<br />

    tfc.ops.pmf_to_quantized_cdf(
        pmf, precision, name=None
    )

This op uses floating-point operations internally. Therefore the quantized
output may not be consistent across multiple platforms. For entropy encoders and
decoders to have the same quantized CDF on different platforms, the quantized
CDF should be produced once and saved, then the saved quantized CDF should be
used everywhere.

After quantization, if PMF does not sum to 2\^precision, then some values of PMF
are increased or decreased to adjust the sum to equal to 2\^precision.

Note that the input PMF is pre-quantization. The input PMF is not normalized
by this op prior to quantization. Therefore the user is responsible for
normalizing PMF if necessary.

<br />

<br />

<br />

| ## Args ||
|---|---|
| `pmf` | A `Tensor` of type `float32`. |
| `precision` | An `int` that is `>= 1`. |
| `name` | A name for the operation (optional). |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| A `Tensor` of type `int32`. ||

<br />