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

Function _do_gather

tensorflow/contrib/layers/python/layers/embedding_ops.py:809–813  ·  view source on GitHub ↗

Deals with doing gather differently for resource variables.

(params, ids, name=None)

Source from the content-addressed store, hash-verified

807
808
809def _do_gather(params, ids, name=None):
810 """Deals with doing gather differently for resource variables."""
811 if isinstance(params, resource_variable_ops.ResourceVariable):
812 return params.sparse_read(ids, name=name)
813 return array_ops.gather(params, ids, name=name)
814
815
816def _embedding_lookup_with_distributed_aggregation(params,

Calls 2

sparse_readMethod · 0.45
gatherMethod · 0.45

Tested by

no test coverage detected