Backward.vjp: def of bendtorch-core@0.1.0.0 Import: import bendtorch-core@0.1.0.0/src/autograd/backward.bend as Backward Lines 107-120 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=107&end_line=120 import Base # The vector-Jacobian product of one node: the contribution each operand # receives when the node's gradient is g, in operand order. def vjp(node: Node, +g: F32) -> List<&2, Contribution>: match node: case Leaf{}: [] case Add{a, b}: [Contribution{a, g}, Contribution{b, g}] case Sub{a, b}: [Contribution{a, g}, Contribution{b, F32.neg(g)}] case Mul{a, b, left, right}: [Contribution{a, F32.mul(g, right)}, Contribution{b, F32.mul(g, left)}] case Neg{a}: [Contribution{a, F32.neg(g)}] Uses (6): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32.mul https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32.neg https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/autograd/backward.bend&name=Contribution https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/autograd/backward.bend&name=Node