ML Community Day is November 9! Join us for updates from TensorFlow, JAX, and more Learn more

tfds.features.Encoding

Encoding type of tfds.features.Tensor.

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

NONE No compression (default). bools/integers will be upcasted to int64 as this is the only integer format supported by the tf.train.Example protobufs in which examples are saved.
BYTES Stored as raw bytes (avoid the upcasting from above).
ZLIB The raw bytes are compressed using zlib.

BYTES <Encoding.BYTES: 'bytes'>
NONE <Encoding.NONE: 'none'>
ZLIB <Encoding.ZLIB: 'zlib'>