TorchLean API

NN.Runtime.Autograd.Torch.Core.Trainer.Parameters

Trainer Parameters #

Mutable, shape-indexed parameter storage for the Torch-style trainer. Parameter values may retain a CUDA mirror; reads and writes keep host and device ownership explicit through the underlying Param operations.

A heterogeneous list of mutable parameters indexed by their tensor shapes.

Instances For

    Materialize value - rate * gradient in one traversal.

    Instances For

      Allocate mutable parameters from an ordered tensor pack.

      Instances For

        Allocate mutable parameters with an explicit trainability mask.

        The mask follows parameter order and must have exactly the same length as the shape list.

        Instances For

          Read the trainability mask in parameter order.

          Instances For

            Read current host parameter values without synchronizing stale CUDA mirrors.

            Instances For

              Read parameter values after synchronizing any current CUDA mirrors to the host.

              Instances For

                Replace host parameter values from an ordered tensor pack.

                Instances For
                  def Runtime.Autograd.Torch.ParamList.sgdStep {α : Type} [Context α] {ss : List Spec.Shape} :
                  ParamList α ssαTList α ssIO Unit

                  Apply param := param - rate * gradient to every trainable parameter.

                  Instances For