Backward.pass: def of bendtorch-core@0.1.0.0 Import: import bendtorch-core@0.1.0.0/src/autograd/backward.bend as Backward Lines 162-172 of bendtorch-core@0.1.0.0/src/autograd/backward.bend: https://jend.leeeet.dev/read.txt?path=bendtorch-core@0.1.0.0/src/autograd/backward.bend&start_line=162&end_line=172 import Base # The gradient of output with respect to each of count nodes, newest first: # None for the nodes newer than output and for every node output does not # reach. def pass(nodes: List<&2, Node>, +count: Nat, +output: Nat) -> List<&2, Maybe<&2, F32>>: match nodes count: case Nil{} count: Nil{} case Con{node, rest} 0n: Nil{} case Con{node, +rest} 1n+below: chosen(node, rest, below, unit => pass(rest, below, output), Nat.is_eq(below, output)) Uses (7): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Maybe https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.is_eq https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/autograd/backward.bend&name=Node https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/autograd/backward.bend&name=chosen