# matmul¶

static OperationNamespace.matmul(a, b, *, name=None)

Performs the matrix multiplication with the two innermost dimensions of two tensors. That is, if the tensors have shapes […, N, M] and […, M, P] (where … indicates compatible batching dimension) the product is a […, N, P] tensor.

Parameters
• a (np.ndarray or Tensor) – The left multiplicand.

• b (np.ndarray or Tensor) – The right multiplicand.

• name (str, optional) – The name of the node.

Returns

The matrix product between a and b. If the rank of a or b is larger than 2, the product is carried out between their innermost dimensions.

Return type

Tensor