oneflow.matmul¶
-
oneflow.
matmul
(input, other) → Tensor¶ This operator applies matrix multiplication to two Tensor.
- Parameters
a (oneflow.Tensor) – A Tensor
b (oneflow.Tensor) – A Tensor
- Returns
The result Tensor
- Return type
For example:
>>> import oneflow as flow >>> import numpy as np >>> input1 = flow.tensor(np.random.randn(2, 6), dtype=flow.float32) >>> input2 = flow.tensor(np.random.randn(6, 5), dtype=flow.float32) >>> of_out = flow.matmul(input1, input2) >>> of_out.shape oneflow.Size([2, 5])