# tff.analytics.heavy_hitters.iblt.decode_iblt_tf

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/federated/blob/v0.87.0 Version 2.0, January 2004 Licensed under the Apache License, Version 2.0 (the) |

Decode a IBLT sketch.

    tff.analytics.heavy_hitters.iblt.decode_iblt_tf(
        iblt: tf.Tensor,
        capacity: int,
        string_max_bytes: int,
        *,
        encoding: https://www.tensorflow.org/federated/api_docs/python/tff/analytics/heavy_hitters/iblt/CharacterEncoding = https://www.tensorflow.org/federated/api_docs/python/tff/analytics/heavy_hitters/iblt/CharacterEncoding#UTF8,
        seed: int = 0,
        repetitions: int = DEFAULT_REPETITIONS,
        hash_family: Optional[str] = None,
        hash_family_params: Optional[dict[str, Union[int, float]]] = None,
        field_size: int = DEFAULT_FIELD_SIZE
    ) -> tuple[tf.Tensor, tf.Tensor, tf.Tensor]

This function wraps `IbltDecoder` to decode `iblt` and returns frequencies
of decoded strings.

<br />

<br />

<br />

| ## Args ||
|---|---|
| `iblt` | Tensor representing the IBLT computed by the IbltEncoder. |
| `capacity` | Number of distinct strings that we expect to be inserted. |
| `string_max_bytes` | Maximum length of a string in bytes that can be inserted. |
| `encoding` | The character encoding of the string data to decode. For non-character binary data or strings with unknown encoding, specify [`CharacterEncoding.UNKNOWN`](https://www.tensorflow.org/federated/api_docs/python/tff/analytics/heavy_hitters/iblt/CharacterEncoding#UNKNOWN). |
| `seed` | Integer seed for hash functions. Defaults to 0. |
| `repetitions` | Number of repetitions in IBLT data structure (must be \>= 3). Defaults to 3. |
| `hash_family` | A `str` specifying the hash family to use to construct IBLT. Options include coupled or random, default is chosen based on capacity. |
| `hash_family_params` | An optional `dict` of parameters that the hash family hasher expects. Defaults are chosen based on capacity. |
| `field_size` | The field size for all values in IBLT. Defaults to 2\*\*31 - 1. |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| `(out_strings, out_counts, num_not_decoded)` where `out_strings` is a [`tf.Tensor`](https://www.tensorflow.org/api_docs/python/tf/Tensor) containing all the decoded strings, `out_counts` is a [`tf.Tensor`](https://www.tensorflow.org/api_docs/python/tf/Tensor) containing the counts of each string and `num_not_decoded` is a [`tf.Tensor`](https://www.tensorflow.org/api_docs/python/tf/Tensor) with the number of items not decoded in the IBLT. ||

<br />