Broadcasting sparse indices #38429
Labels
comp:ops
OPs related issues
stat:awaiting tensorflower
Status - Awaiting response from tensorflower
type:feature
Feature requests
System information
Will this change the current api? How?
Add an operation to
tf.sparse.broadcast_indices
(feel free to suggest a beter name), doing the following:This would provide a basic building block for arbitrary pointwise-binary operations on SparseTensors. Therefore I would also suggest adding a function like
This would then allow for more efficient implementations e.g. of binary metrics when both labels and predictions are sparse, e.g. when calculating P@k statistics.
I think I can provide an initial, sub-optimal implementation that builds this on top of
tf.sparse.add
for default values of zero. Would you be interested in a PR like that (maybe putting it into experimental namespace at first)?The text was updated successfully, but these errors were encountered: