W3cubDocs

/TensorFlow 2.4

tf.raw_ops.SparseMatrixMatMul

Matrix-multiplies a sparse matrix with a dense matrix.

Returns a dense matrix. For inputs A and B, where A is CSR and B is dense; this op returns a dense C;

If transpose_output is false, returns:

C = A . B

If transpose_output is true, returns:

C = transpose(A . B) = transpose(B) . transpose(A)

where the transposition is performed along the two innermost (matrix) dimensions.

If conjugate_output is true, returns:

C = conjugate(A . B) = conjugate(A) . conjugate(B)

If both conjugate_output and transpose_output are true, returns:

C = conjugate(transpose(A . B)) = conjugate(transpose(B)) .
                                  conjugate(transpose(A))
Args
a A Tensor of type variant. A CSRSparseMatrix.
b A Tensor. A dense tensor.
transpose_a An optional bool. Defaults to False. Indicates whether a should be transposed.
transpose_b An optional bool. Defaults to False. Indicates whether b should be transposed.
adjoint_a An optional bool. Defaults to False. Indicates whether a should be conjugate-transposed.
adjoint_b An optional bool. Defaults to False. Indicates whether b should be conjugate-transposed.
transpose_output An optional bool. Defaults to False. Transposes the product of a and b.
conjugate_output An optional bool. Defaults to False. Conjugates the product of a and b.
name A name for the operation (optional).
Returns
A Tensor. Has the same type as b.

© 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/r2.4/api_docs/python/tf/raw_ops/SparseMatrixMatMul