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

Function _sparse_op

tensorflow/python/training/input.py:561–568  ·  view source on GitHub ↗
(stored)

Source from the content-addressed store, hash-verified

559 # Since the output of `_store{_many}_sparse is wrapped in a tf.cond `Merge`,
560 # we can't just get the Op of the resulting tensor.
561 def _sparse_op(stored):
562 for input_tensor in stored.op.inputs:
563 if input_tensor.op.type in ("AddSparseToTensorsMap",
564 "AddManySparseToTensorsMap"):
565 return input_tensor.op
566 # If there was no sparse input, then the original stored Tensor wasn't
567 # sparse and we can just return the original Tensor's Op.
568 return stored.op
569 sparse_info_list = [
570 _sparse_meta_data(t, _sparse_op(stored), shared_map_op)
571 for t, stored, shared_map_op

Callers 1

_store_sparse_tensorsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected