TFDS now supports the Croissant 🥐 format! Read the documentation to know more.

tfds.features.Encoding

View source on GitHub

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.

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 protobufs in which examples are saved.
BYTES Stored as raw bytes (avoid the upcasting from above).
ZLIB The raw bytes are compressed using zlib.

Class Variables

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

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2024年04月26日 UTC.