def StepInv
bendtorch-core@0.1.0.0 · src/autograd/gradient_PROOF.bend:225
import bendtorch-core@0.1.0.0/src/autograd/gradient_PROOF.bend as GradientPROOF
import Base
import bendtorch-core@0.1.0.0/src/shape/core.bend as Shape
import bendtorch-core@0.1.0.0/src/tensor/core.bend as Core
import bendtorch-core@0.1.0.0/src/autograd/gradient.bend as Gradient
225def StepInv(+shape: Shape.Shape, -original: Core.Tensor<shape>, -contribution: Core.Dynamic, +cursor: Nat, result: Gradient.Step<shape>) -> Type:
226 match result:
227 case Gradient.Stop{owner, total, error}:
228 Unit
229 case Gradient.Continue{state}:
230 Inv(shape, original, contribution, 1n+cursor, state_total(shape, state))