latest (dev)
Copy
Latest development documentation · Updated 2026-10-15
tensorplay.functional.bmm
- tensorplay.functional.bmm(input, mat2, out_dtype=None, *, out=None) Tensor[source]
Performs a batch matrix-matrix product of matrices stored in
inputandmat2.inputandmat2must be 3-D tensors each containing the same number of matrices.If
\text{out}_i = \text{input}_i \mathbin{@} \text{mat2}_iinputis a tensor,mat2is a tensor,outwill be a tensor.This operator supports TensorFloat32.
On certain ROCm devices, when using float16 inputs this module will use different precision for backward.
Note
This function does not broadcast. For broadcasting matrix products, see
tensorplay.matmul().- Parameters:
- Keyword Arguments:
out (Tensor, optional) – the output tensor.
Example:
>>> input = tensorplay.randn(10, 3, 4) >>> mat2 = tensorplay.randn(10, 4, 5) >>> res = tensorplay.bmm(input, mat2) >>> res.size() tensorplay.Size([10, 3, 5])
Help improve this page
Found an error, an unclear step, or a missing example?
Was this page helpful?

