TorchLean API

NN.Examples.Quickstart.AutogradBasics

Quickstart: Autograd Basics #

Tour of the public autograd APIs beyond ordinary training:

Run: lake exe torchlean quickstart_autograd

@[reducible, inline]
Instances For
    @[reducible, inline]
    Instances For
      @[reducible, inline]
      Instances For
        @[reducible, inline]
        Instances For

          The tour stays on the public Float autodiff surface. It avoids:

          Instead, it uses TorchLean.autograd.* directly on a tiny fixed payload.

          Deterministic model/sample payload for the autograd walkthrough.

          The example stays small: one Linear layer, one input vector, one target vector, and one fixed parameter-direction for JVP/HVP queries.

          Instances For

            Fixed Float tensors used by the walkthrough.

            Instances For

              Parameter pack for the single Linear layer in model.

              Instances For

                Direction vector in parameter space used for JVP/HVP examples.

                Instances For

                  Unpack this tutorial's single Linear-layer parameter pack.

                  Instances For

                    Run the Float autograd walkthrough.

                    Instances For

                      Command-line help for the Float autograd quickstart.

                      Instances For

                        CLI entrypoint for the Float autograd quickstart.

                        Instances For