docsapi referencedarkforest-core-autograd-tape
API Referencecrate: darkforest-coresince v0.1.0-alpha

Tape

Dynamic iterative execution tape tracking computational forward graphs for reverse-mode automatic differentiation.

Tape

darkforest-core module: autograd since v0.1.0-alpha

Signature

rust
pub struct Tape { nodes: RefCell<Vec<Node>>, in_progress: Cell<bool> }

Overview

Dynamic iterative execution tape tracking computational forward graphs for reverse-mode automatic differentiation.

Invariants & Design Principles

  • Invariant: Iterative worklist evaluation avoids C-callstack recursion panics on deep graphs.
  • Invariant: Cycles in graph trigger explicit compile-time or runtime cycle errors.

Usage Example

rust
let mut tape = Tape::new(); tape.backward(&loss);

Related Components