mindspore.ops.mm
- mindspore.ops.mm(input, mat2)[source]
Returns 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.ops.matmul()
instead if you need a broadcastable function.On Ascend, float64 doesn't be supported.
- Parameters
- Returns
Tensor or scalar
- Supported Platforms:
Ascend
GPU
CPU
Examples
>>> import mindspore >>> out = mindspore.ops.mm(mindspore.ops.ones((2, 3)), mindspore.ops.ones((3, 4))) >>> print(out.shape) (2, 4)