• Computes the dot product of two matrices, A * B. These must be matrices.

    const a = tf.tensor2d([1, 2], [1, 2]);
    const b = tf.tensor2d([1, 2, 3, 4], [2, 2]);

    a.matMul(b).print(); // or tf.matMul(a, b)

    Type Parameters

    Parameters

    • a: TensorLike | Tensor<Rank>

      First matrix in dot product operation.

    • b: TensorLike | Tensor<Rank>

      Second matrix in dot product operation.

    • Optional transposeA: boolean

      If true, a is transposed before multiplication.

    • Optional transposeB: boolean

      If true, b is transposed before multiplication.

    Returns T

    Doc