ResizableTensorFieldParameterSource<T>
Models & Types · AiDotNet.Models.Parameters
A tensor field whose one unresolved axis is learned from the first restore payload.
Implements: IParameterChunkSource<T>, IParameterLayoutSource, IVariableLengthParameterSource<T>
How It Works
Fit-sized models can declare a placeholder such as [0] or [5, 0]. The fixed
dimensions preserve the tensor’s structure while the single zero dimension identifies the
axis whose width is data-dependent. Once restored, the source becomes fixed-size and every
later restore is validated exactly like TensorFieldParameterSource.
Constructors
| Constructor | Summary |
|---|---|
ResizableTensorFieldParameterSource(Func<Tensor<T>> get, Action<Tensor<T>> set) |
Creates a source over a replaceable, fit-sized tensor field. |
Properties
| Property | Summary |
|---|---|
bool CanResizeOnRestore { get; } |
|
long ParameterCount { get; } |
Methods
| Method | Summary |
|---|---|
IEnumerable<ParameterChunk<T>> GetParameterStateChunks() |
Exposes dense tensor fields directly so registry checkpoints do not download their values. |
IReadOnlyList<ParameterSlotDescriptor> GetParameterLayout() |
|
Vector<T> GetParameters() |
|
void SetParameters(Vector<T> parameters) |