Adds two SparseTensor
objects to produce another SparseTensor
.
tf.raw_ops.SparseAdd(
a_indices,
a_values,
a_shape,
b_indices,
b_values,
b_shape,
thresh,
name=None
)
The input SparseTensor
objects' indices are assumed ordered in standard
lexicographic order. If this is not the case, before this step run
SparseReorder
to restore index ordering.
By default, if two values sum to zero at some index, the output SparseTensor
would still include that particular location in its index, storing a zero in the
corresponding value slot. To override this, callers can specify thresh
,
indicating that if the sum has a magnitude strictly smaller than thresh
, its
corresponding value and index would then not be included. In particular,
thresh == 0
(default) means everything is kept and actual thresholding happens
only for a positive value.
In the following shapes, nnz
is the count after taking thresh
into account.
Returns | |
---|---|
A tuple of Tensor objects (sum_indices, sum_values, sum_shape).
|
|
sum_indices
|
A Tensor of type int64 .
|
sum_values
|
A Tensor . Has the same type as a_values .
|
sum_shape
|
A Tensor of type int64 .
|