Model State #
nn.State α shapes is the public, shape-indexed container for model parameters and persistent
buffers. Its recursive tensor-pack representation stays behind the runtime boundary; application
code reads and replaces entries through named operations.
Model parameters and persistent buffers in their statically known order.
The element type is shared while every tensor keeps its own shape from shapes.
- tensors : TorchLean.TensorPack α shapes
Instances For
Wrap the runtime tensor-pack representation at an implementation boundary.
Instances For
Reveal the runtime tensor-pack representation at an implementation boundary.
Instances For
Revealing a freshly wrapped tensor pack returns the original pack.
Replace one tensor in the runtime representation.
Instances For
Two states are equal when their tensor-pack representations are equal.
Combine corresponding state tensors with a shape-preserving operation.
Instances For
Named result of splitting state at a statically known shape-list boundary.
- left : State α leftShapes
State before the split boundary.
- right : State α rightShapes
State after the split boundary.