tf.data.experimental.rejection_resample

View source on GitHub

A transformation that resamples a dataset to achieve a target distribution.

tf.data.experimental.rejection_resample(
    class_func, target_dist, initial_dist=None, seed=None
)

NOTE Resampling is performed via rejection sampling; some fraction of the input values will be dropped.

Args:

Returns:

A Dataset transformation function, which can be passed to tf.data.Dataset.apply.