Загрузка
Performs a batch matrix-matrix product of matrices stored
in batch1 and batch2,
with a reduced add step (all matrix multiplications get accumulated
along the first dimension).
input is added to the final result.
batch1 and batch2 must be 3-D tensors each containing the
same number of matrices.
If batch1 is a tensor, batch2 is a
tensor, input must be
broadcastable with a tensor
and out will be a tensor.
If beta is 0, then the content of input will be ignored, and nan and inf in
it will not be propagated.
For inputs of type FloatTensor or DoubleTensor, arguments beta and alpha
must be real numbers, otherwise they should be integers.
This operator supports TensorFloat32.
On certain ROCm devices, when using float16 inputs this module will use different precision for backward.
beta (Number, optional) – multiplier for input ()
Example:
>>> M = torch.randn(3, 5)
>>> batch1 = torch.randn(10, 3, 4)
>>> batch2 = torch.randn(10, 4, 5
alpha (Number, optional) – multiplier for batch1 @ batch2 ()
out (Tensor, optional) – the output tensor.