# tfio.experimental.serialization.save_dataset

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/io/blob/v0.24.0/tensorflow_io/python/experimental/serial_ops.py#L168-L186) |

Saves a flat dataset as a tfrecord file, and builds a header file for reloading as dataset.

    tfio.experimental.serialization.save_dataset(
        dataset, tfrecord_path, header_path
    )

Must run in eager mode because it depends on dataset iteration and element_spec.