Version: dev

tape

Stable type · Replay and adjoint

Tier: stable · Kind: type · Topic: Replay and adjoint

JuliaRust
not exportedtape::Tape

Julia

Julia does not export this type.

Rust

pub struct Tape {
    pub records: Vec<TapeRecord>,
}

impl Tape { pub fn to_jsonl(&self) -> String }

impl Tape { pub fn from_jsonl(text: &str) -> Result<Tape, String> }

impl Tape { pub fn index(&self) -> HashMap<&str, &TapeRecord> }

impl Tape { pub fn macro_segment(&self, k: usize) -> &[TapeRecord] }

impl Tape { pub fn step_counts(&self) -> (u64, u64) }

The tape of a run.

Source · Rust docs

Example (replay)

let again = spec.replay(&u0, &p, &fwd.tape).unwrap();
assert_eq!(again.final_state(), fwd.final_state());

From docs/api/examples/rust/forward_and_gradient.rs