topos 0.13.1

An autodiff compiler stack in Rust.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use super::SlotId;

/// A learnable parameter: a leaf whose live payload a training step
/// replaces through `Parameters::step`.
///
/// The node holds only its slot; the recorded initial lives in the
/// network's slot table and the live payload in the caller's
/// `Parameters`, which is what lets a gradient step swap state without
/// touching the recorded structure. It behaves exactly like `Leaf`
/// during runs: supplied rather than computed, with no gradients
/// routed back.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub(crate) struct Parameter(pub(crate) SlotId);