# tf.raw_ops.SparseMatrixMul

<br />

Element-wise multiplication of a sparse matrix with a dense tensor.

#### View aliases


**Compat aliases for migration**

See
[Migration guide](https://www.tensorflow.org/guide/migrate) for
more details.

[`tf.compat.v1.raw_ops.SparseMatrixMul`](https://www.tensorflow.org/api_docs/python/tf/raw_ops/SparseMatrixMul)

<br />

    tf.raw_ops.SparseMatrixMul(
        a, b, name=None
    )

Returns a sparse matrix.

The dense tensor `b` may be either a scalar; otherwise `a` must be a rank-3
`SparseMatrix`; in this case `b` must be shaped `[batch_size, 1, 1]` and the
multiply operation broadcasts.

> [!NOTE]
> **Note:** even if `b` is zero, the sparsity structure of the output does not change.

<br />

<br />

<br />

| ## Args ||
|---|---|
| `a` | A `Tensor` of type `variant`. A CSRSparseMatrix. |
| `b` | A `Tensor`. A dense tensor. |
| `name` | A name for the operation (optional). |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| A `Tensor` of type `variant`. ||

<br />