Missed TensorFlow World? Check out the recap. Learn more

tff.simulation.datasets.build_dataset_mixture

View source on GitHub

Build a new dataset that probabilistically returns examples.

tff.simulation.datasets.build_dataset_mixture(
    a,
    b,
    a_probability
)

Args:

Returns:

A tf.data.Dataset that returns examples from dataset a with probability a_probability, and examples form dataset b with probability (1 - a_probability). The dataset will yield the number of examples equal to the smaller of a or b.