MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / _unique

Function _unique

tensorflow/python/ops/ctc_ops.py:988–992  ·  view source on GitHub ↗
(x)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

_get_dimFunction · 0.70
castMethod · 0.45

Tested by

no test coverage detected