Interface IAssociativeMemory<T>
- Namespace
- AiDotNet.Interfaces
- Assembly
- AiDotNet.dll
Interface for Associative Memory modules used in nested learning. Models both backpropagation and attention mechanisms as associative memory.
public interface IAssociativeMemory<T>
Type Parameters
TThe numeric type
Properties
Capacity
Gets the memory capacity.
int Capacity { get; }
Property Value
Methods
Associate(Vector<T>, Vector<T>)
Associates an input with a target output (learns the mapping). In backpropagation context: maps data point to local error. In attention context: maps queries to key-value pairs.
void Associate(Vector<T> input, Vector<T> target)
Parameters
inputVector<T>targetVector<T>
Clear()
Clears all stored associations.
void Clear()
Retrieve(Vector<T>)
Retrieves the associated output for a given input query.
Vector<T> Retrieve(Vector<T> query)
Parameters
queryVector<T>
Returns
- Vector<T>
Update(Vector<T>, Vector<T>, T)
Updates the memory based on new associations.
void Update(Vector<T> input, Vector<T> target, T learningRate)
Parameters
inputVector<T>targetVector<T>learningRateT