SparseDenseCwiseAdd


tensorflow C++ API

tensorflow::ops::SparseDenseCwiseAdd

Adds up a SparseTensor and a dense Tensor, using these special rules:


Summary

(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:

  • scope: A Scope object
  • sp_indices: 2-D. N x R matrix with the indices of non-empty values in a SparseTensor, possibly not in canonical ordering.
  • sp_values: 1-D. N non-empty values corresponding to sp_indices.
  • sp_shape: 1-D. Shape of the input SparseTensor.
  • dense: R-D. The dense Tensor operand.

Returns:

  • Output: 1-D. The N values that are operated on.

SparseDenseCwiseAdd 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 sp_indices: connect Input node.
  • Input sp_values: connect Input node.
  • Input sp_shape: connect Input node.
  • Input dense: connect Input node.

Return:

  • Output output: Output object of SparseDenseCwiseAdd class object.

Result:

  • std::vector(Tensor) product_result : Returned object of executed result by calling session.

Using Method

results matching ""

    No results matching ""