gemm

dragon.math.gemm(
  inputs,
  alpha=1.0,
  beta=1.0,
  transpose_a=False,
  transpose_b=False,
  **kwargs
)[source]

Compute the general matrix multiplication.

\[\text{out} = \alpha AB + \beta C \]
Parameters:
  • inputs (Sequence[dragon.Tensor]) – The matrix \(A\), \(B\) and optional \(C\).
  • alpha (float, optional, default=1.0) – The value to \(\alpha\).
  • beta (float, optional, default=1.0) – The value to \(\beta\).
  • transpose_a (bool, optional, default=False) – True to transpose \(A\) before computation.
  • transpose_b (bool, optional, default=False) – True to transpose \(B\) before computation.
Returns:

dragon.Tensor – The output tensor.