def backward
import bendtorch-core@0.1.0.0/src/autograd/tensor_backward.bend as TensorBackwardimport Base
916# Runs one backward of output and accumulates its gradients into the slots.
917# An output the tape does not hold is refused with UnknownNode; a tape with a
918# node that refers to itself or to a newer or missing node is refused with
919# DanglingOperand. Both refusals leave the tape unchanged.
920def backward(tape: Tape, +output: Nat) -> Tape & Result<&2, &2, Error, Unit>:
921 Tape{entries} = tape
922 planned(output, listed(entries))