chainer.functions.batch_matmul¶
-
chainer.functions.
batch_matmul
(a, b, transa=False, transb=False)[source]¶ Computes the batch matrix multiplications of two sets of arrays.
Parameters: - a (Variable) – The left operand of the batch matrix multiplications.
A 2-D array of shape
(B, N)
is considered as B \(N \times 1\) matrices. A 3-D array of shape(B, M, N)
is considered as B \(M \times N\) matrices. - b (Variable) – The right operand of the batch matrix multiplications.
Its array is treated as matrices in the same way as
a
’s array. - transa (bool) – If
True
, transpose each matrix ina
. - transb (bool) – If
True
, transpose each matrix inb
.
Returns: The result of the batch matrix multiplications as a 3-D array.
Return type: Deprecated since version v3.0.0: batch_matmul is deprecated. Use
matmul
instead.- a (Variable) – The left operand of the batch matrix multiplications.
A 2-D array of shape