From: Yong Tang Date: Sat, 27 Jan 2018 19:57:38 +0000 (+0000) Subject: Add python wrapper for unique_with_counts X-Git-Tag: upstream/v1.7.0~136^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=812eac93168881c6472fc08b90bdc4a9695b3220;p=platform%2Fupstream%2Ftensorflow.git Add python wrapper for unique_with_counts to call gen_array_ops._unique_with_counts Signed-off-by: Yong Tang --- diff --git a/tensorflow/python/ops/array_ops.py b/tensorflow/python/ops/array_ops.py index 08db8a1..1482496 100644 --- a/tensorflow/python/ops/array_ops.py +++ b/tensorflow/python/ops/array_ops.py @@ -1319,6 +1319,18 @@ def unique(x, out_idx=dtypes.int32, name=None): unique.__doc__ = gen_array_ops._unique.__doc__ +@tf_export("unique_with_counts") +def unique_with_counts(x, out_idx=dtypes.int32, name=None): + # TODO(yongtang): switch to v2 once API deprecation + # period (3 weeks) pass. + # TODO(yongtang): The documentation should also + # be updated when switch to v2. + return gen_array_ops._unique_with_counts(x, out_idx, name) + + +unique_with_counts.__doc__ = gen_array_ops._unique_with_counts.__doc__ + + @tf_export("split") def split(value, num_or_size_splits, axis=0, num=None, name="split"): """Splits a tensor into sub tensors.