torch.bmm
-
torch.bmm(input, mat2, *, deterministic=False, out=None) → Tensor -
Performs a batch matrix-matrix product of matrices stored in
inputandmat2.inputandmat2must be 3-D tensors each containing the same number of matrices.If
inputis a tensor,mat2is a tensor,outwill be a tensor.This operator supports TensorFloat32.
Note
This function does not broadcast. For broadcasting matrix products, see
torch.matmul().- Parameters
- Keyword Arguments
Example:
>>> input = torch.randn(10, 3, 4) >>> mat2 = torch.randn(10, 4, 5) >>> res = torch.bmm(input, mat2) >>> res.size() torch.Size([10, 3, 5])
© 2019 Torch Contributors
Licensed under the 3-clause BSD License.
https://pytorch.org/docs/1.8.0/generated/torch.bmm.html