parameters: (a, b,
             transpose_a=False, transpose_b=False,
             a_is_sparse=False, b_is_sparse=False,
             name=None)
docstring: Multiplies matrix `a` by matrix `b`, producing `a` * `b`.
  
    The inputs must be two-dimensional matrices, with matching inner dimensions,
    possibly after transposition.
  
    Both matrices must be of the same type. The supported types are:
    `float32`, `float64`, `int32`, `complex64`.
  
    Either matrix can be transposed on the fly by setting the corresponding flag
    to `True`. This is `False` by default.
  
    If one or both of the matrices contain a lot of zeros, a more efficient
    multiplication algorithm can be used by setting the corresponding
    `a_is_sparse` or `b_is_sparse` flag to `True`. These are `False` by default.
  
    For example:
  
    ```python
    # 2-D tensor `a`
    a = tf.constant([1, 2, 3, 4, 5, 6], shape=[2, 3]) => [[1. 2. 3.]
                                                          [4. 5. 6.]]
    # 2-D tensor `b`
    b = tf.constant([7, 8, 9, 10, 11, 12], shape=[3, 2]) => [[7. 8.]
                                                             [9. 10.]
                                                             [11. 12.]]
    c = tf.matmul(a, b) => [[58 64]
                            [139 154]]
    ```
  
    Args:
      a: `Tensor` of type `float32`, `float64`, `int32` or `complex64`.
      b: `Tensor` with same type as `a`.
      transpose_a: If `True`, `a` is transposed before multiplication.
      transpose_b: If `True`, `b` is transposed before multiplication.
      a_is_sparse: If `True`, `a` is treated as a sparse matrix.
      b_is_sparse: If `True`, `b` is treated as a sparse matrix.
      name: Name for the operation (optional).
  
    Returns:
      A `Tensor` of the same type as `a`.
docstring_summary: Multiplies matrix `a` by matrix `b`, producing `a` * `b`.
docstring_tokens: Multiplies matrix a by matrix b producing a * b .
function: def matmul(a, b,
             transpose_a=False, transpose_b=False,
             a_is_sparse=False, b_is_sparse=False,
             name=None):
    """Multiplies matrix `a` by matrix `b`, producing `a` * `b`.
  
    The inputs must be two-dimensional matrices, with matching inner dimensions,
    possibly after transposition.
  
    Both matrices must be of the same type. The supported types are:
    `float32`, `float64`, `int32`, `complex64`.
  
    Either matrix can be transposed on the fly by setting the corresponding flag
    to `True`. This is `False` by default.
  
    If one or both of the matrices contain a lot of zeros, a more efficient
    multiplication algorithm can be used by setting the corresponding
    `a_is_sparse` or `b_is_sparse` flag to `True`. These are `False` by default.
  
    For example:
  
    ```python
    # 2-D tensor `a`
    a = tf.constant([1, 2, 3, 4, 5, 6], shape=[2, 3]) => [[1. 2. 3.]
                                                          [4. 5. 6.]]
    # 2-D tensor `b`
    b = tf.constant([7, 8, 9, 10, 11, 12], shape=[3, 2]) => [[7. 8.]
                                                             [9. 10.]
                                                             [11. 12.]]
    c = tf.matmul(a, b) => [[58 64]
                            [139 154]]
    ```
  
    Args:
      a: `Tensor` of type `float32`, `float64`, `int32` or `complex64`.
      b: `Tensor` with same type as `a`.
      transpose_a: If `True`, `a` is transposed before multiplication.
      transpose_b: If `True`, `b` is transposed before multiplication.
      a_is_sparse: If `True`, `a` is treated as a sparse matrix.
      b_is_sparse: If `True`, `b` is treated as a sparse matrix.
      name: Name for the operation (optional).
  
    Returns:
      A `Tensor` of the same type as `a`.
    """
    with ops.op_scope([a, b], name, "MatMul") as name:
      a = ops.convert_to_tensor(a, name="a")
      b = ops.convert_to_tensor(b, name="b")
      sparse_matmul_types = [dtypes.bfloat16, dtypes.float32]
      use_sparse_matmul = (a.dtype in sparse_matmul_types and
                           b.dtype in sparse_matmul_types and
                           (a_is_sparse or b_is_sparse))
      if dtypes.bfloat16 in (a.dtype, b.dtype):
        # matmul currently doesn't handle bfloat16 inputs.
        use_sparse_matmul = True
      if use_sparse_matmul:
        return sparse_matmul(a, b,
                             transpose_a=transpose_a,
                             transpose_b=transpose_b,
                             a_is_sparse=a_is_sparse,
                             b_is_sparse=b_is_sparse,
                             name=name)
      else:
        return gen_math_ops._mat_mul(a, b,
                                     transpose_a=transpose_a,
                                     transpose_b=transpose_b,
                                     name=name)
function_tokens: def matmul ( a , b , transpose_a = False , transpose_b = False , a_is_sparse = False , b_is_sparse = False , name = None ) : with ops . op_scope ( [ a , b ] , name , "MatMul" ) as name : a = ops . convert_to_tensor ( a , name = "a" ) b = ops . convert_to_tensor ( b , name = "b" ) sparse_matmul_types = [ dtypes . bfloat16 , dtypes . float32 ] use_sparse_matmul = ( a . dtype in sparse_matmul_types and b . dtype in sparse_matmul_types and ( a_is_sparse or b_is_sparse ) ) if dtypes . bfloat16 in ( a . dtype , b . dtype ) : # matmul currently doesn't handle bfloat16 inputs. use_sparse_matmul = True if use_sparse_matmul : return sparse_matmul ( a , b , transpose_a = transpose_a , transpose_b = transpose_b , a_is_sparse = a_is_sparse , b_is_sparse = b_is_sparse , name = name ) else : return gen_math_ops . _mat_mul ( a , b , transpose_a = transpose_a , transpose_b = transpose_b , name = name )