tensorflow::
ops::
SparseAddGrad
#include <sparse_ops.h>
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.
Args:
- 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.
Constructors and Destructors |
|
|---|---|
SparseAddGrad
(const ::
tensorflow::Scope
& scope, ::
tensorflow::Input
backprop_val_grad, ::
tensorflow::Input
a_indices, ::
tensorflow::Input
b_indices, ::
tensorflow::Input
sum_indices)
|
Public attributes |
|
|---|---|
a_val_grad
|
|
b_val_grad
|
|
operation
|
|
Public attributes
Public functions
SparseAddGrad
SparseAddGrad( const ::tensorflow::Scope & scope, ::tensorflow::Input backprop_val_grad, ::tensorflow::Input a_indices, ::tensorflow::Input b_indices, ::tensorflow::Input sum_indices )