From ddbe17802d508619e749522e998dfb323c363921 Mon Sep 17 00:00:00 2001 From: Yong Tang Date: Sat, 24 Feb 2018 02:44:13 +0000 Subject: [PATCH] Update api_def for UniqueWithCounts/UniqueWithCountsV2 Signed-off-by: Yong Tang --- .../base_api/api_def_UniqueWithCountsV2.pbtxt | 85 ++++++++++++++++++++++ .../python_api/api_def_UniqueWithCounts.pbtxt | 4 + .../python_api/api_def_UniqueWithCountsV2.pbtxt | 4 + 3 files changed, 93 insertions(+) create mode 100644 tensorflow/core/api_def/base_api/api_def_UniqueWithCountsV2.pbtxt create mode 100644 tensorflow/core/api_def/python_api/api_def_UniqueWithCounts.pbtxt create mode 100644 tensorflow/core/api_def/python_api/api_def_UniqueWithCountsV2.pbtxt diff --git a/tensorflow/core/api_def/base_api/api_def_UniqueWithCountsV2.pbtxt b/tensorflow/core/api_def/base_api/api_def_UniqueWithCountsV2.pbtxt new file mode 100644 index 0000000..e21f56b --- /dev/null +++ b/tensorflow/core/api_def/base_api/api_def_UniqueWithCountsV2.pbtxt @@ -0,0 +1,85 @@ +op { + graph_op_name: "UniqueWithCountsV2" + in_arg { + name: "x" + description: < [1, 2, 4, 7, 8] +idx ==> [0, 0, 1, 2, 2, 2, 3, 4, 4] +count ==> [2, 1, 3, 1, 2] +``` + +For an `2-D` tensor `x` with `axis = 0`: + +``` +# tensor 'x' is [[1, 0, 0], +# [1, 0, 0], +# [2, 0, 0]] +y, idx, count = unique_with_counts(x, axis=0) +y ==> [[1, 0, 0], + [2, 0, 0]] +idx ==> [0, 0, 1] +count ==> [2, 1] +``` + +For an `2-D` tensor `x` with `axis = 1`: + +``` +# tensor 'x' is [[1, 0, 0], +# [1, 0, 0], +# [2, 0, 0]] +y, idx, count = unique_with_counts(x, axis=1) +y ==> [[1, 0], + [1, 0], + [2, 0]] +idx ==> [0, 1, 1] +count ==> [1, 2] +``` +END +} diff --git a/tensorflow/core/api_def/python_api/api_def_UniqueWithCounts.pbtxt b/tensorflow/core/api_def/python_api/api_def_UniqueWithCounts.pbtxt new file mode 100644 index 0000000..71b35ea --- /dev/null +++ b/tensorflow/core/api_def/python_api/api_def_UniqueWithCounts.pbtxt @@ -0,0 +1,4 @@ +op { + graph_op_name: "UniqueWithCounts" + visibility: HIDDEN +} diff --git a/tensorflow/core/api_def/python_api/api_def_UniqueWithCountsV2.pbtxt b/tensorflow/core/api_def/python_api/api_def_UniqueWithCountsV2.pbtxt new file mode 100644 index 0000000..7876e55 --- /dev/null +++ b/tensorflow/core/api_def/python_api/api_def_UniqueWithCountsV2.pbtxt @@ -0,0 +1,4 @@ +op { + graph_op_name: "UniqueWithCountsV2" + visibility: HIDDEN +} -- 2.7.4