SparseAddGrad
tensorflow C++ API
tensorflow::ops::SparseAddGrad
The gradient operator for the SparseAdd op.
Summary
The SparseAdd op calculates A + B, where A, B, and the sum are all represented as SparseTensor objects. This op takes in the upstream gradient w.r.t. non-empty values of the sum, and outputs the gradients w.r.t. the non-empty values of A and B.
Arguments:
- scope: A Scope object
- backprop_val_grad: 1-D with shape
[nnz(sum)]. The gradient with respect to the non-empty values of the sum. - a_indices: 2-D. The
indicesof theSparseTensorA, size[nnz(A), ndims]. - b_indices: 2-D. The
indicesof theSparseTensorB, size[nnz(B), ndims]. - sum_indices: 2-D. The
indicesof the sumSparseTensor, size[nnz(sum), ndims].
Returns:
Outputa_val_grad: 1-D with shape[nnz(A)]. The gradient with respect to the non-empty values of A.Outputb_val_grad: 1-D with shape[nnz(B)]. The gradient with respect to the non-empty values of B.
SparseAddGrad block
Source link : https://github.com/EXPNUNI/enuSpaceTensorflow/blob/master/enuSpaceTensorflow/tf_sparse.cpp

Argument:
- Scope scope : A Scope object (A scope is generated automatically each page. A scope is not connected.)
- Input backprop_val_grad: connect Input node.
- Input a_indices: connect Input node.
- Input b_indices: connect Input node.
- Input sum_indices: connect Input node.
Return:
- Output a_val_grad: Output object of SparseAdd class object.
- Output b_val_grad: Output object of SparseAdd class object.
Result:
- std::vector(Tensor) product_result : Returned object of executed result by calling session.
Using Method
*SparseAdd 노드 생성방법은 SparseAdd 페이지에 기재되어 있음.