[null,null,["Last updated 2020-10-01 UTC."],[],[],null,["# tf.contrib.data.rejection_resample\n\n\u003cbr /\u003e\n\n|-----------------------------------------------------------------------------------------------------------------------------------------|\n| [View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/contrib/data/python/ops/resampling.py#L24-L46) |\n\nA transformation that resamples a dataset to achieve a target distribution. (deprecated) \n\n tf.contrib.data.rejection_resample(\n class_func, target_dist, initial_dist=None, seed=None\n )\n\n| **Warning:** THIS FUNCTION IS DEPRECATED. It will be removed in a future version. Instructions for updating: Use [`tf.data.experimental.rejection_resample(...)`](../../../tf/data/experimental/rejection_resample).\n| **Note:** Resampling is performed via rejection sampling; some fraction of the input values will be dropped.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Args ---- ||\n|----------------|----------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `class_func` | A function mapping an element of the input dataset to a scalar [`tf.int32`](../../../tf#int32) tensor. Values should be in `[0, num_classes)`. |\n| `target_dist` | A floating point type tensor, shaped `[num_classes]`. |\n| `initial_dist` | (Optional.) A floating point type tensor, shaped `[num_classes]`. If not provided, the true class distribution is estimated live in a streaming fashion. |\n| `seed` | (Optional.) Python integer seed for the resampler. |\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Returns ------- ||\n|---|---|\n| A `Dataset` transformation function, which can be passed to [`tf.data.Dataset.apply`](../../../tf/data/Dataset#apply). ||\n\n\u003cbr /\u003e"]]