oa::FnMatrix::linearGelu
linearGelu: fused linear + GELU. output = GELU(input @ weight^T + bias) The fused forward discards the pre-activation; the autograd node recomputes it (one GEMM) for geluBwd in the backward pass.
Function Documentation
linearGelu: fused linear + GELU. output = GELU(input @ weight^T + bias) The fused forward discards the pre-activation; the autograd node recomputes it (one GEMM) for geluBwd in the backward pass.
Parameters
inXconst Matrix &—
inWeightconst Matrix &—
inBiasconst Matrix &—
Returns
MatrixThe declared return value.