(x)
| 986 | labels = ops.convert_to_tensor(labels, name="labels") |
| 987 | |
| 988 | def _unique(x): |
| 989 | u = array_ops.unique(x) |
| 990 | y = array_ops.pad(u.y, [[0, _get_dim(u.idx, 0) - _get_dim(u.y, 0)]]) |
| 991 | y = math_ops.cast(y, dtypes.int64) |
| 992 | return [y, u.idx] |
| 993 | |
| 994 | return map_fn.map_fn(_unique, labels, dtype=[dtypes.int64, dtypes.int32]) |
| 995 |