SparseDenseCwiseMul
tensorflow C++ API
tensorflow::ops::SparseDenseCwiseMul
Component-wise multiplies a SparseTensor by a dense Tensor.
Summary
The output locations corresponding to the implicitly zero elements in the sparse tensor will be zero (i.e., will not take up storage space), regardless of the contents of the dense tensor (even if it’s +/-INF and that INF*0 == NaN).
Limitation: this Op only broadcasts the dense side to the sparse side, but not the other direction.
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 tosp_indices
. - sp_shape: 1-D. Shape of the input SparseTensor.
- dense:
R
-D. The dense Tensor operand.
Returns:
Output
: 1-D. TheN
values that are operated on.
SparseDenseCwiseMul 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 SparseDenseCwiseMul class object.
Result:
- std::vector(Tensor) product_result : Returned object of executed result by calling session.