TF 2.0 is out! Get hands-on practice at TF World, Oct 28-31. Use code TF20 for 20% off select passes. Register now

Module: tfds.file_adapter

View source

tfds.file_adapter.FileFormatAdapters for GeneratorBasedBuilder.

FileFormatAdapters implement methods to write and read data from a particular file format.

Currently, a single FileAdapter is available: * TFRecordExampleAdapter: To store the pre-processed dataset as .tfrecord file

return TFRecordExampleAdapter({
    "x": tf.FixedLenFeature(tuple(), tf.int64)


class FileFormatAdapter: Provides writing and reading methods for a file format.

class TFRecordExampleAdapter: Writes/Reads serialized Examples protos to/from TFRecord files.