tf.data.experimental.rejection_resample
A transformation that resamples a dataset to achieve a target distribution. (deprecated)
tf.data.experimental.rejection_resample(
class_func, target_dist, initial_dist=None, seed=None
)
Args |
class_func
|
A function mapping an element of the input dataset to a scalar
tf.int32 tensor. Values should be in [0, num_classes) .
|
target_dist
|
A floating point type tensor, shaped [num_classes] .
|
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.
|
seed
|
(Optional.) Python integer seed for the resampler.
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates. Some content is licensed under the numpy license.
Last updated 2022-11-04 UTC.
[null,null,["Last updated 2022-11-04 UTC."],[],[]]