Hi,
Is it possible to define an output signature for a TFRecordDataset? Currently, I’m using the snippet below:
raw_dataset = tf.data.TFRecordDataset(
tf_files, compression_type="GZIP", num_parallel_reads=tf.data.AUTOTUNE
)
def get_data():
for element in raw_dataset.map(read_tfrecord):
yield element
dataset = tf.data.Dataset.from_generator(get_data, output_signature=sign)
I would like to know if there’s a better way that leads to better performance.