torch_npu.npu_bmmV2

API接口

torch_npu.npu_bmmV2(self, mat2, output_sizes) -> Tensor

功能描述

将矩阵“a”乘以矩阵“b”,生成“a*b”。

参数说明

示例

>>> mat1 = torch.randn(10, 3, 4).npu()
>>> mat2 = torch.randn(10, 4, 5).npu()
>>> res = torch_npu.npu_bmmV2(mat1, mat2, [])
>>> res.shape
torch.Size([10, 3, 5])