Applies op to the .values tensor of one or more SparseTensors.
tf.sparse.map_values(
op, *args, **kwargs
)
Replaces any SparseTensor in args or kwargs with its values
tensor (which contains the non-default values for the SparseTensor),
and then calls op. Returns a SparseTensor that is constructed
from the input SparseTensors' indices, dense_shape, and the
value returned by the op.
If the input arguments contain multiple SparseTensors, then they must have
equal indices and dense shapes.
The operation that should be applied to the SparseTensor values. op
is typically an element-wise operation (such as math_ops.add), but any
operation that preserves the shape can be used.
*args
Arguments for op.
**kwargs
Keyword arguments for op.
Returns
A SparseTensor whose indices and dense_shape matches the indices
and dense_shape of all input SparseTensors.
Raises
ValueError
If args contains no SparseTensor, or if the indices
or dense_shapes of the input SparseTensors are not equal.