# tfc.PackedTensors

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/compression/blob/v2.14.1/tensorflow_compression/python/util/packed_tensors.py#L25-L100) |

Packed representation of compressed tensors.

    tfc.PackedTensors(
        string=None
    )

This class can pack and unpack several tensor values into a single string. It
can also optionally store a model identifier.

The tensors currently must be rank 1 (vectors) and either have integer or
string type.

<br />

<br />

<br />

| ## Attributes ||
|---|---|
| `model` | A model identifier. |
| `string` | The string representation of this object. |

<br />

## Methods

### `pack`

[View source](https://github.com/tensorflow/compression/blob/v2.14.1/tensorflow_compression/python/util/packed_tensors.py#L64-L84)

    pack(
        tensors
    )

Packs `Tensor` values into this object.

### `unpack`

[View source](https://github.com/tensorflow/compression/blob/v2.14.1/tensorflow_compression/python/util/packed_tensors.py#L86-L100)

    unpack(
        dtypes
    )

Unpacks values from this object based on dtypes.