Spec-Zone.ru › TensorFlow

tf.data.experimental.unique

Creates a Dataset from another Dataset, discarding duplicates. (deprecated)

View aliases

Compat aliases for migration

See Migration guide for more details.

tf.compat.v1.data.experimental.unique

tf.data.experimental.unique()
Deprecated: THIS FUNCTION IS DEPRECATED. It will be removed in a future version. Instructions for updating: Use `tf.data.Dataset.unique(...)

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

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.

© 2022 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 4.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/api_docs/python/tf/data/experimental/unique

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API