Function marian::affine

Function Documentation

Expr marian::affine(Expr a, Expr b, Expr bias, bool transA = false, bool transB = false, float scalar = 1.f)

Performs an affine transformation.

Computes \( C \leftarrow \alpha \operatorname{op}(A) \cdot \operatorname{op}(B) + C\), where \( \operatorname{op}(A) = A \) if transA is false, and \( \operatorname{op}(A) = A^\top \) if true. The \(\alpha\) parameter is set by scalar.