Class FusedLinearOp
- Namespace
- AiDotNet.JitCompiler.IR.Operations
- Assembly
- AiDotNet.dll
Fused linear operation (MatMul + Add bias).
public class FusedLinearOp : IROp
- Inheritance
-
FusedLinearOp
- Inherited Members
Remarks
Combines matrix multiplication and bias addition into a single operation. This is the fundamental operation of a neural network dense/linear layer.
For Beginners: This combines two operations into one.
Instead of: t1 = MatMul(input, weights) // Matrix multiply t2 = Add(t1, bias) // Add bias
We do: t2 = Linear(input, weights, bias) // One operation!
Benefits:
- Fewer memory reads/writes
- Better cache utilization
- Less overhead
- Typically 1.5-2x faster
Methods
Validate()
Validates that this operation has correct inputs (3 inputs: input, weights, bias).
public override bool Validate()