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.
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
indices
of theSparseTensor
A, size[nnz(A), ndims]
. - b_indices: 2-D. The
indices
of theSparseTensor
B, size[nnz(B), ndims]
. - sum_indices: 2-D. The
indices
of the sumSparseTensor
, size[nnz(sum), ndims]
.
Returns:
-
Output
a_val_grad: 1-D with shape[nnz(A)]
. The gradient with respect to the non-empty values of A. -
Output
b_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
a_val_grad
::tensorflow::Output a_val_grad
b_val_grad
::tensorflow::Output b_val_grad
operation
Operation operation
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 )
© 2020 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 3.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/versions/r1.15/api_docs/cc/class/tensorflow/ops/sparse-add-grad