An example of a DatasetSplitFn
that returns the original client data.
tff.learning.reconstruction.simple_dataset_split_fn(
client_dataset: tf.data.Dataset
) -> tuple[tf.data.Dataset, tf.data.Dataset]
Both the reconstruction data and post-reconstruction data will result from
iterating over the same tf.data.Dataset. Note that depending on any
preprocessing steps applied to client tf.data.Datasets, this may not produce
exactly the same data in the same order for both reconstruction and
post-reconstruction. For example, if
client_dataset.shuffle(reshuffle_each_iteration=True)
was applied,
post-reconstruction data will be in a different order than reconstruction
data.
Returns |
A tuple of two tf.data.Datasets , the first to be used for reconstruction,
the second to be used post-reconstruction.
|