<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/datasets/blob/v4.9.10/tensorflow_datasets/core/features/tensor_feature.py#L42-L61) |

Encoding type of [`tfds.features.Tensor`](https://www.tensorflow.org/datasets/api_docs/python/tfds/features/Tensor).

For higher dimension tensors, it is recommended to define the encoding as
zlib or bytes to save space on disk.

<br />

<br />

<br />

| ## Attributes ||
|---|---|
| `NONE` | No compression (default). bools/integers will be upcasted to int64 as this is the only integer format supported by the [`tf.train.Example`](https://www.tensorflow.org/tutorials/load_data/tfrecord#tftrainexample) protobufs in which examples are saved. |
| `BYTES` | Stored as raw bytes (avoid the upcasting from above). |
| `ZLIB` | The raw bytes are compressed using zlib. |

<br />

<br />

<br />

<br />

| ## Class Variables ||
|---|---|
| BYTES | `<Encoding.BYTES: 'bytes'>` |
| NONE | `<Encoding.NONE: 'none'>` |
| ZLIB | `<Encoding.ZLIB: 'zlib'>` |

<br />