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

Function _prune_invalid_weights

tensorflow/python/ops/embedding_ops.py:2068–2074  ·  view source on GitHub ↗

Prune invalid weights (< 0) from the input ids and weights.

(sparse_ids, sparse_weights)

Source from the content-addressed store, hash-verified

2066
2067
2068def _prune_invalid_weights(sparse_ids, sparse_weights):
2069 """Prune invalid weights (< 0) from the input ids and weights."""
2070 if sparse_weights is not None:
2071 is_weights_valid = math_ops.greater(sparse_weights.values, 0)
2072 sparse_ids = sparse_ops.sparse_retain(sparse_ids, is_weights_valid)
2073 sparse_weights = sparse_ops.sparse_retain(sparse_weights, is_weights_valid)
2074 return sparse_ids, sparse_weights

Callers 2

Calls 1

greaterMethod · 0.80

Tested by

no test coverage detected