Interface IContextFlow<T>
- Namespace
- AiDotNet.Interfaces
- Assembly
- AiDotNet.dll
Interface for Context Flow mechanism - maintains distinct information pathways and update rates for each nested optimization level. Core component of nested learning paradigm.
public interface IContextFlow<T>
Type Parameters
TThe numeric type
Properties
NumberOfLevels
Gets the number of context flow levels.
int NumberOfLevels { get; }
Property Value
Methods
CompressContext(Vector<T>, int)
Compresses internal context flows (deep learning compression mechanism).
Vector<T> CompressContext(Vector<T> context, int targetLevel)
Parameters
contextVector<T>targetLevelint
Returns
- Vector<T>
ComputeContextGradients(Vector<T>, int)
Computes gradients with respect to context flow for backpropagation.
Vector<T> ComputeContextGradients(Vector<T> upstreamGradient, int level)
Parameters
upstreamGradientVector<T>levelint
Returns
- Vector<T>
GetContextState(int)
Gets the current context state for a specific optimization level.
Vector<T> GetContextState(int level)
Parameters
levelint
Returns
- Vector<T>
PropagateContext(Vector<T>, int)
Propagates context through the flow network at a specific optimization level. Each level has its own distinct set of information from which it learns.
Vector<T> PropagateContext(Vector<T> input, int currentLevel)
Parameters
inputVector<T>currentLevelint
Returns
- Vector<T>
Reset()
Resets the context flow to initial state.
void Reset()
UpdateFlow(Vector<T>[], T[])
Updates the context flow based on multi-level optimization.
void UpdateFlow(Vector<T>[] gradients, T[] learningRates)
Parameters
gradientsVector<T>[]learningRatesT[]