CommonLoopUtils icon indicating copy to clipboard operation
CommonLoopUtils copied to clipboard

Adds `reshuffle_each_iteration` argument to `deterministic_data.create_dataset()`.

Open copybara-service[bot] opened this issue 1 year ago • 0 comments

Adds reshuffle_each_iteration argument to deterministic_data.create_dataset().

This argument is passed to tf.data.Dataset.shuffle() and controls whether the dataset is reshuffled each time it is iterated over. The default value is None, which is the same as the default value of reshuffle_each_iteration in tf.data.Dataset.shuffle().

This change is being made to support the use of deterministic_data.create_dataset() in evaluation loops that need to access the same evaluation data batches in each iteration of the dataset without reshuffling before each iteration/epoch over the dataset. This is useful, for example, in visualizing the progress of image generation models at different model checkpoints. Visualizing the model progress on the same evaluation data makes Tensorboard qualitative evaluation easier.

This change is backwards compatible. If the reshuffle_each_iteration argument is not specified, the default value of None will be used.

copybara-service[bot] avatar Aug 09 '24 19:08 copybara-service[bot]