Skip to content

Instantly share code, notes, and snippets.

"""Easily save tf.data.Datasets as tfrecord files, and restore tfrecords as Datasets.
The goal of this module is to create a SIMPLE api to tfrecords that can be used without
learning all of the underlying mechanics.
Users only need to deal with 2 functions:
save(dataset)
dataset = load(tfrecord, header)
To make this work, we create a .header file for each tfrecord which encodes metadata