TorchLean API

NN.Runtime.Autograd.Torch.Core.OptimizerCheckpoint.Schema

Optimizer Checkpoint Schemas #

An optimizer checkpoint is meaningful only for the parameter layout that produced it. This module stores that shared layout: parameter shapes in module order and the corresponding trainability flags. Optimizer-specific codecs validate this schema before installing backend state.

Ordered parameter metadata shared by backend-owned optimizer checkpoints.

  • shapes : List Spec.Shape

    Parameter shapes in module order.

  • requiresGrad : List Bool

    Whether each corresponding parameter is trainable.

Instances For

    Whether the shape list and mutability mask describe the same number of parameters.

    Instances For

      Number of parameters for which an optimizer state entry is expected.

      Instances For

        Write the ordered parameter schema for an optimizer-specific checkpoint format.

        Instances For

          Read a parameter schema and reject any difference from the expected module layout.

          Instances For