ContextFlow<T>
Models & Types ยท AiDotNet.NestedLearning
Implementation of Context Flow mechanism for nested learning. Maintains distinct information pathways for each optimization level, enabling deeper computational depth in learning components.
Inheritance: NestedLearningBase<T> โ ContextFlow<T>
Implements: IContextFlow<T>
Constructors
| Constructor | Summary |
|---|---|
ContextFlow(int contextDimension, int numLevels) |
Properties
| Property | Summary |
|---|---|
int NumberOfLevels { get; } |
Methods
| Method | Summary |
|---|---|
Matrix<T>[] GetCompressionMatrices() |
Gets the compression matrices for inspection/debugging. |
Matrix<T>[] GetTransformationMatrices() |
Gets the transformation matrices for inspection/debugging. |
Vector<T> CompressContext(Vector<T> context, int targetLevel) |
|
Vector<T> ComputeContextGradients(Vector<T> upstreamGradient, int level) |
|
Vector<T> GetContextState(int level) |
|
Vector<T> PropagateContext(Vector<T> input, int currentLevel) |
|
void Reset() |
|
void UpdateFlow(Vector<T>[] gradients, T[] learningRates) |