Gemm
Description
Computes the product of alpha multiplied by A and B, and then sum up the product of alpha multiplied by beta and input C.

Input
- A: 2D matrix tensor of type float16 or float. The data type must be deducible from that of C and B. The shape (or the transposed shape) must be compatible for multiplication with B. The data format can be ND.
- B: 2D matrix tensor of type float16 or float. The data type must be deducible from that of C and A. The shape (or the transposed shape) must be compatible for multiplication with A. The data format can be ND.
- C (optional): bias.
Attribute
- transA: bool, indicating whether A needs to be transposed. The default value is 0, meaning that A is not transposed. The value 1 means A is transposed.
- transB: bool, indicating whether B needs to be transposed. The default value is 0, meaning that B is not transposed. The value 1 means B is transposed.
- alpha: float, scalar multiplier of the product of input tensors A and B.
- beta: float, scalar multiplier of input tensor C.
Output
Y: 2D matrix tensor. The shape must be the same as that of the A@B computation result. The data type must be deduced from that of C. The data type can be float16 or float.
Constraints
The v8, v9, and v10 versions do not support the input of the float type when the atc tool parameter --precision_mode=must_keep_origin_dtype is used.
ONNX Opset Support
Opset v8/v9/v10/v11/v12/v13/v14/v15/v16/v17/v18
Parent topic: Supported ONNX Operators