Ë
    BÆVh8  ã                   ój   — d Z ddlmZ ddlmZ  ej
                  dd«       ed«      dd„«       «       Zy)	z#Resampling dataset transformations.é    )Údeprecation)Ú	tf_exportNz.Use `tf.data.Dataset.rejection_resample(...)`.z$data.experimental.rejection_resamplec                 ó   ‡ ‡‡‡— ˆ ˆˆˆfd„}|S )aþ  A transformation that resamples a dataset to achieve a target distribution.

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

  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.

  Returns:
    A `Dataset` transformation function, which can be passed to
    `tf.data.Dataset.apply`.
  c                 ó.   •— | j                  ‰‰‰‰¬«      S )zEFunction from `Dataset` to `Dataset` that applies the transformation.)Ú
class_funcÚtarget_distÚinitial_distÚseed)Úrejection_resample)Údatasetr   r	   r
   r   s    €€€€úb/home/dcms/DCMS/lib/python3.12/site-packages/tensorflow/python/data/experimental/ops/resampling.pyÚ	_apply_fnz%rejection_resample.<locals>._apply_fn)   s)   ø€ ð ×%Ñ%ØØØ!Øð	 &ó ð ó    © )r   r   r	   r
   r   s   ```` r   r   r      s   û€ ÷*ð 
Ðr   )NN)Ú__doc__Útensorflow.python.utilr   Ú tensorflow.python.util.tf_exportr   Ú
deprecatedr   r   r   r   ú<module>r      sC   ðñ *Ý .Ý 6ð €×Ñ˜ÐNÓOÙ
Ð1Ó2òó 3ó Pñr   