ContinuumMemorySystemLayer<T>
Layers · AiDotNet.NeuralNetworks.Layers
Continuum Memory System (CMS) layer for neural networks. Implements a sequential chain of MLP blocks with different update frequencies. Based on Equations 30-31 from “Nested Learning” paper. yt = MLP^(fk)(MLP^(fk-1)(…MLP^(f1)(xt)))
Inheritance: LayerBase<T> → ContinuumMemorySystemLayer<T>
Implements: IShapeContract
Constructors
| Constructor | Summary |
|---|---|
ContinuumMemorySystemLayer(int[] inputShape, int hiddenDim, int numFrequencyLevels, int[] updateFrequencies, T[] learningRates, IEngine engine) |
Properties
| Property | Summary |
|---|---|
bool SupportsTraining { get; } |
|
int[] ChunkSizes { get; } |
Gets the chunk sizes for gradient accumulation. |
int[] UpdateFrequencies { get; } |
Gets the update frequencies for each level. |
Methods
| Method | Summary |
|---|---|
DenseLayer<T>[] GetMLPBlocks() |
Gets the MLP blocks in the chain. |
IReadOnlyList<ILayer<T>> GetSubLayers() |
|
IReadOnlyList<OutputAxisContract> OutputAxesFor(int inputRank) |
|
void ClearGradients() |
Clears all accumulated gradients across all levels. |
void ConsolidateMemory() |
Consolidates memory from faster to slower levels. |
void ResetMemory() |
Resets all MLP blocks in the chain. |
void ResetState() |
Resets the state of the layer (required by LayerBase). |