Automatic Differentiation #
The common transforms are named directly:
autograd.graddifferentiates scalar tensor functions and accepts(value := true);autograd.model.graddifferentiates model losses and accepts(value := true);Traineris the ordinary training API and adds optimizer updates, batching, devices, and logs.
Namespace completion after autograd. exposes the function transforms. Completion after
autograd.model. exposes the model transforms and loss namespace. Named options such as value
appear in each operation's signature instead of creating additional AndValue declarations.
Start with NN.Examples.Quickstart.AutogradBasics. Full Jacobians, JVPs, Hessians, and
Hessian-vector products are kept in NN.Examples.DeepDives.AutogradTransforms.