law unused_leaf_none
import bendtorch-core@0.1.0.0/src/autograd/backward_LAWS.bend as BackwardLAWSimport Base
import bendtorch-core@0.1.0.0/src/autograd/backward.bend as Backward
269# With x, y and z recorded and z only used by a node newer than the output
270# x * y, backward of x * y seeds the output, leaves z and the newer node None,
271# and gives x and y their VJP.
272law unused_leaf_none:
273 for +x: F32
274 for +y: F32
275 for +z: F32
276 {slots_after(Backward.backward(program_unused(x, y, z), 3n)) ==
277 Done{[None{}, Some{1.0}, None{}, Some{F32.mul(1.0, x)}, Some{F32.mul(1.0, y)}]} :
278 Result<&2, &2, Backward.Error, List<&2, Maybe<&2, F32>>>}
Uses (9)
Used by (0)
No other definition uses this definition.