KeyedScalarCollectionParameterSource<T, TKey>
Models & Types · AiDotNet.Models.Parameters
A scalar dictionary exposed in canonical key order.
Implements: IParameterLayoutSource, IParameterSource<T>, IParameterTopologySource
How It Works
The source keeps the keys in the manifest, not merely the current enumeration order. This is the parameter adapter for tabular models whose learned values live directly in dictionaries; adding or re-inserting an unrelated key therefore cannot reorder an existing checkpoint.
Constructors
| Constructor | Summary |
|---|---|
KeyedScalarCollectionParameterSource(Func<IDictionary<TKey, T>> get) |
Creates a write-through source over the dictionary returned by get. |
Properties
| Property | Summary |
|---|---|
long ParameterCount { get; } |
Methods
| Method | Summary |
|---|---|
IReadOnlyList<ParameterSlotDescriptor> GetParameterLayout() |
|
Vector<T> GetParameters() |
|
void ReadParameterTopology(BinaryReader reader) |
|
void SetParameters(Vector<T> parameters) |
|
void WriteParameterTopology(BinaryWriter writer) |