Commit b9af4308 authored by Yong Tang's avatar Yong Tang
Browse files

Enable multi-dimensional and axis support for tf.unique_with_counts



This fix tries to address the issue raised in 16499 to bring
multi-dimensional and axis support for `unique_with_counts`.

When `UniqueV2` kernel was added in 12952, it actually supports
multi-dimensional and axis support for `unique_with_counts` as well,
just not registered.

This fix:
1. Register `UniqueWithCountsV2` kernel to have axis support.
2. Hide both `UniqueWithCounts` and `UniqueWithCountsV2`
3. Add python unique_with_counts wrapper to call `gen_array_ops._unique_with_counts`
4. If APi review passes and the PR merges, `unique_with_counts` will switch to `gen_array_ops._unique_with_counts_v2` (in 3 weeks).

This fix fixes 16499.

Signed-off-by: default avatarYong Tang <yong.tang.github@outlook.com>
parent 4845809b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment