mindspore.mint.mm
- mindspore.mint.mm(input, mat2)[source]
Return the matrix product of two arrays. If input is a \((n \times m)\) tensor, mat2 is a \((m \times p)\) tensor, out will be a \((n \times p)\) tensor.
Note
This function cannot support broadcasting. Refer to
mindspore.mint.matmul()instead if you need a broadcastable function. The last dimension of input must be the same size as the first dimension of mat2.Warning
This is an experimental API that is subject to change or deletion.
- Parameters
- Returns
Tensor
- Supported Platforms:
Ascend
Examples
>>> import mindspore >>> x1 = mindspore.mint.rand(2, 3) >>> x2 = mindspore.mint.rand(3, 4) >>> mindspore.mint.mm(x1, x2).shape (2, 4)