powered by
Use this transformation to produce a dataset that contains one instance of each unique element in the input (See example).
dataset_unique(dataset, name = NULL)
A tf.Dataset
A tf.Dataset.
(Optional.) A name for the tf.data operation.
if (FALSE) { c(0, 37, 2, 37, 2, 1) %>% as_tensor("int32") %>% tensor_slices_dataset() %>% dataset_unique() %>% as_array_iterator() %>% iterate() %>% sort() # [1] 0 1 2 37 }
Run the code above in your browser using DataLab