TorchLean API

NN.Runtime.Autograd.Torch.Core.Trainer.CheckpointSchema

Trainer Checkpoint Schema #

Parameter slots survive across forward tapes, while the tape's registration maps are cleared after an update. Construct checkpoint metadata from the trainer's parameter pack once, using the same storage identity comparison as grouped optimizer updates.

Record each trainable slot's first occurrence of the same mutable storage.

Frozen slots retain their place in the schema but never own optimizer moments. In particular, a frozen view preceding a trainable view does not become that trainable parameter's representative. We compare all storage cells through ParameterStorage.same; equal tensor values alone do not make independently allocated parameters aliases.

Instances For