tff.analytics.data_processing.get_unique_elements

Gets the unique elements from the input dataset.

The input dataset must yield batched 1-d tensors. This function reads each coordinate of the tensor as an individual element and return unique elements.

dataset A tf.data.Dataset.

A rank-1 Tensor containing the unique elements of the input dataset.