#include <sparse_ops.h>
Adds up a SparseTensor and a dense Tensor, using these special rules:
(1) Broadcasts the dense side to have the same shape as the sparse side, if eligible; (2) Then, only the dense values pointed to by the indices of the SparseTensor participate in the cwise addition.
By these rules, the result is a logical SparseTensor with exactly the same indices and shape, but possibly with different non-zero values. The output of this Op is the resultant non-zero values.
Arguments:
N x R
matrix with the indices of non-empty values in a SparseTensor, possibly not in canonical ordering.N
non-empty values corresponding to sp_indices
.R
-D. The dense Tensor operand.Returns:
Output
: 1-D. The N
values that are operated on. Constructors and Destructors | |
---|---|
SparseDenseCwiseAdd(const ::tensorflow::Scope & scope, ::tensorflow::Input sp_indices, ::tensorflow::Input sp_values, ::tensorflow::Input sp_shape, ::tensorflow::Input dense) |
Public attributes | |
---|---|
output |
Public functions | |
---|---|
node() const | ::tensorflow::Node * |
operator::tensorflow::Input() const | |
operator::tensorflow::Output() const |
::tensorflow::Output output
SparseDenseCwiseAdd( const ::tensorflow::Scope & scope, ::tensorflow::Input sp_indices, ::tensorflow::Input sp_values, ::tensorflow::Input sp_shape, ::tensorflow::Input dense )
::tensorflow::Node * node() const
operator::tensorflow::Input() const
operator::tensorflow::Output() const
© 2017 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/api_docs/cc/class/tensorflow/ops/sparse-dense-cwise-add.html