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

Function batch_gather

tensorflow/python/ops/array_ops.py:3994–4002  ·  view source on GitHub ↗

Gather slices from params according to indices with leading batch dims.

(params, indices, name=None)

Source from the content-addressed store, hash-verified

3992 "2017-10-25", "`tf.batch_gather` is deprecated, please use `tf.gather` "
3993 "with `batch_dims=-1` instead.") # pylint: disable=missing-docstring
3994def batch_gather(params, indices, name=None):
3995 """Gather slices from params according to indices with leading batch dims."""
3996 with ops.name_scope(name, "BatchGather", [params, indices]):
3997 indices = ops.convert_to_tensor(indices, name="indices")
3998 params = ops.convert_to_tensor(params, name="params")
3999 if indices.shape.ndims is None:
4000 raise ValueError(
4001 "batch_gather does not allow indices with unknown shape.")
4002 return _batch_gather(params, indices, batch_dims=indices.shape.ndims - 1)
4003
4004
4005def _batch_gather(params, indices, batch_dims, axis=None):

Callers

nothing calls this directly

Calls 2

_batch_gatherFunction · 0.85
name_scopeMethod · 0.45

Tested by

no test coverage detected