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

Function _sparse_meta_data

tensorflow/python/training/input.py:511–520  ·  view source on GitHub ↗
(t, storing_op, map_op)

Source from the content-addressed store, hash-verified

509 maybe_shared_map_ops = shared_map_ops or [None] * len(tensor_list)
510
511 def _sparse_meta_data(t, storing_op, map_op):
512 if not isinstance(t, sparse_tensor.SparseTensor):
513 return _SparseMetaData(False, None, None)
514 rank = t.dense_shape.shape.with_rank(1).dims[0]
515 if enqueue_many:
516 rank -= 1
517 # If a shared map_op was provided, use that. Otherwise use the name of
518 # the operation used to store the SparseTensor.
519 return _SparseMetaData(
520 sparse=True, map_op=map_op or storing_op, rank=rank)
521
522 def _maybe_store(t, shared_map_op):
523 """Store Sparse tensor, if necessary."""

Callers 1

_store_sparse_tensorsFunction · 0.85

Calls 2

_SparseMetaDataClass · 0.85
with_rankMethod · 0.80

Tested by

no test coverage detected