Link Search Menu Expand Document

SparseTensorDenseMatMul


tensorflow C++ API

tensorflow::ops::SparseTensorDenseMatMul

Multiply SparseTensor (of rank 2) “A” by dense matrix “B”.


Summary

No validity checking is performed on the indices of A. However, the following input format is recommended for optimal behavior:

if adjoint_a == false: A should be sorted in lexicographically increasing order. UseSparseReorderif you’re not sure. if adjoint_a == true: A should be sorted in order of increasing dimension 1 (i.e., “column major” order instead of “row major” order).

Arguments:

  • scope: AScope object
  • a_indices: 2-D. Theindicesof theSparseTensor, size[nnz, 2]Matrix.
  • a_values: 1-D. Thevaluesof theSparseTensor, size[nnz]Vector.
  • a_shape: 1-D. Theshapeof theSparseTensor, size[2]Vector.
  • b: 2-D. A dense Matrix.

Optional attributes (seeAttrs):

  • adjoint_a: Use the adjoint of A in the matrix multiply. If A is complex, this is transpose(conj(A)). Otherwise it’s transpose(A).
  • adjoint_b: Use the adjoint of B in the matrix multiply. If B is complex, this is transpose(conj(B)). Otherwise it’s transpose(B).

Returns:


SparseTensorDenseMatMul 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 a_indices: connect Input node.
  • Input a_values: connect Input node.
  • Input a_shape: connect Input node.
  • Input b: connect Input node.

Return:

  • Ouput output_indices: Output object of SparseTensorDenseAdd class object.

Result:

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

Using Method