TensorListParameterSource<T>
Models & Types ยท AiDotNet.Models.Parameters
One or more tensor lists exposed as a single parameter surface, concatenated in the order the lists are given and, within each list, in index order.
Implements: IParameterChunkSource<T>, IParameterLayoutSource, IParameterSource<T>
How It Works
For models that hold weights as bare List<Tensor<T>> rather than layers โ a
feature-pyramid neck keeps a lateral weight and bias per level, and an output pair per level.
The tensors are written THROUGH, never replaced, so a restore reaches the same instances the
forward pass reads.
The lists are also exposed as LIVE chunks, one per tensor. Without that the registry could only hand an optimizer a flat copy of these weights, and a tape-based training step - which keys gradients by tensor reference - had nothing it could update in place, so every neck weight stayed at its initial value.
Constructors
| Constructor | Summary |
|---|---|
TensorListParameterSource(Func<IReadOnlyList<Tensor<T>>>[] lists) |
Creates a source over the given tensor lists, in order. |
Properties
| Property | Summary |
|---|---|
long ParameterCount { get; } |
Methods
| Method | Summary |
|---|---|
IEnumerable<ParameterChunk<T>> GetParameterStateChunks() |
|
IReadOnlyList<ParameterSlotDescriptor> GetParameterLayout() |
|
Vector<T> GetParameters() |
|
void SetParameters(Vector<T> parameters) |