B
    Ù»ˆd  ã               @   s<   d Z ddlmZ ddlmZ e dd¡edƒdd„ ƒƒZdS )	z'Unique element dataset transformations.é    )Údeprecation)Ú	tf_exportNz Use `tf.data.Dataset.unique(...)zdata.experimental.uniquec              C   s   dd„ } | S )a
  Creates a `Dataset` from another `Dataset`, discarding duplicates.

  Use this transformation to produce a dataset that contains one instance of
  each unique element in the input. For example:

  ```python
  dataset = tf.data.Dataset.from_tensor_slices([1, 37, 2, 37, 2, 1])

  # Using `unique()` will drop the duplicate elements.
  dataset = dataset.apply(tf.data.experimental.unique())  # ==> { 1, 37, 2 }
  ```

  Returns:
    A `Dataset` transformation function, which can be passed to
    `tf.data.Dataset.apply`.
  c             S   s   |   ¡ S )N)Úunique)Zdataset© r   ú`/var/www/html/venv/lib/python3.7/site-packages/tensorflow/python/data/experimental/ops/unique.pyÚ	_apply_fn(   s    zunique.<locals>._apply_fnr   )r   r   r   r   r      s    r   )Ú__doc__Ztensorflow.python.utilr   Z tensorflow.python.util.tf_exportr   Ú
deprecatedr   r   r   r   r   Ú<module>   s   
