pub struct DifferentiableProofTraceMap { /* private fields */ }Expand description
Collection of differentiable proof traces keyed by stable proof ID.
Implementations§
Source§impl DifferentiableProofTraceMap
impl DifferentiableProofTraceMap
Sourcepub fn insert(&mut self, spec: ProofTraceSpec) -> u64
pub fn insert(&mut self, spec: ProofTraceSpec) -> u64
Insert a trace and return its stable proof ID.
Sourcepub fn trace(&self, proof_id: u64) -> Option<&ProofTrace>
pub fn trace(&self, proof_id: u64) -> Option<&ProofTrace>
Get one exported trace by proof ID.
Sourcepub fn traces(&self) -> impl Iterator<Item = &ProofTrace>
pub fn traces(&self) -> impl Iterator<Item = &ProofTrace>
Iterate over exported traces.
Sourcepub fn accumulate_binary_logistic_gradients(
&mut self,
targets: &[(String, f64)],
) -> f64
pub fn accumulate_binary_logistic_gradients( &mut self, targets: &[(String, f64)], ) -> f64
Accumulate binary logistic gradients grouped by answer key.
Sourcepub fn apply_gradients(&mut self, learning_rate: f64)
pub fn apply_gradients(&mut self, learning_rate: f64)
Apply accumulated gradients to trace weights.
Trait Implementations§
Source§impl Clone for DifferentiableProofTraceMap
impl Clone for DifferentiableProofTraceMap
Source§fn clone(&self) -> DifferentiableProofTraceMap
fn clone(&self) -> DifferentiableProofTraceMap
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DifferentiableProofTraceMap
impl Debug for DifferentiableProofTraceMap
Source§impl Default for DifferentiableProofTraceMap
impl Default for DifferentiableProofTraceMap
Source§fn default() -> DifferentiableProofTraceMap
fn default() -> DifferentiableProofTraceMap
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for DifferentiableProofTraceMap
impl RefUnwindSafe for DifferentiableProofTraceMap
impl Send for DifferentiableProofTraceMap
impl Sync for DifferentiableProofTraceMap
impl Unpin for DifferentiableProofTraceMap
impl UnsafeUnpin for DifferentiableProofTraceMap
impl UnwindSafe for DifferentiableProofTraceMap
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more