TorchLean Runtime Autograd #
Public autograd APIs for model- and function-level differentiation.
def
TorchLean.autograd.model.linearParams
{α : Type}
{inDim outDim seedW seedB : ℕ}
(w : Tensor.T α (Shape.mat outDim inDim))
(b : Tensor.T α (Shape.vec outDim))
:
Params (NN.API.nn.pure.linear inDim outDim seedW seedB) α
Pack explicit weight and bias tensors for the public nn.linear constructor.
This is the parameter-side companion to nn.linear inDim outDim seedW seedB.
Instances For
Pack one tensor into the typed parameter/result container used by the public autograd APIs.
Instances For
def
TorchLean.autograd.model.pack2
{α : Type}
{s₁ s₂ : Shape}
(x₁ : Tensor.T α s₁)
(x₂ : Tensor.T α s₂)
:
nn.ParamTensors α [s₁, s₂]
Pack two tensors into the typed parameter/result container used by the public autograd APIs.
Instances For
def
TorchLean.autograd.model.unpack1
{α : Type}
{s₁ : Shape}
(xs : nn.ParamTensors α [s₁])
:
Tensor.T α s₁
Unpack a one-entry typed autograd parameter/result container.