Stay organized with collections Save and categorize content based on your preferences.

TensorFlow 1 version View source on GitHub

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:

dataset =[1, 37, 2, 37, 2, 1])

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

A Dataset transformation function, which can be passed to