law reached_exactly

bendtorch-core@0.1.0.0 · src/autograd/backward_LAWS.bend:261

import bendtorch-core@0.1.0.0/src/autograd/backward_LAWS.bend as BackwardLAWS
import Base
import bendtorch-core@0.1.0.0/src/autograd/backward.bend as Backward

261# Only the reachable graph: a node has a gradient exactly when the selected
262# output reaches it. Every other node, newer or unused, reads None.
263law reached_exactly:
264  for +graph: List<&2, Backward.Node>
265  for +output: Nat
266  {somes(Backward.pass(graph, List.length(&2, Backward.Node, graph), output)) ==
267    reached(graph, List.length(&2, Backward.Node, graph), output) : List<&2, Bool>}

Uses (9)

Used by (0)

No other definition uses this definition.