pub struct InferResult<L: LinAlg = CpuLinAlg> {
pub y_conv: L::Vector,
pub latent_concat: L::Vector,
pub hidden_states: Vec<L::Vector>,
pub prediction_errors: Vec<L::Vector>,
pub surprise_score: f64,
pub steps_used: usize,
pub converged: bool,
pub tanh_components: Vec<Option<L::Vector>>,
}Expand description
Fields§
§y_conv: L::VectorConverged output logits.
latent_concat: L::VectorAll hidden states concatenated (fed to critic).
Per-layer hidden state activations.
prediction_errors: Vec<L::Vector>Per-layer prediction errors from the last PC inference step. Ordered from top hidden layer to bottom (reverse layer order).
surprise_score: f64RMS prediction error across layers.
steps_used: usizeNumber of inference steps performed.
converged: boolWhether the inference loop converged within tolerance.
tanh_components: Vec<Option<L::Vector>>Per-layer tanh components for residual layers.
None for non-skip layers, Some(tanh_out) for skip-eligible layers.
Needed for correct backward pass (derivative on tanh_out, not full h[i]).
Trait Implementations§
Source§impl<L: Clone + LinAlg> Clone for InferResult<L>
impl<L: Clone + LinAlg> Clone for InferResult<L>
Source§fn clone(&self) -> InferResult<L>
fn clone(&self) -> InferResult<L>
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 moreAuto Trait Implementations§
impl<L> Freeze for InferResult<L>
impl<L> RefUnwindSafe for InferResult<L>
impl<L> Send for InferResult<L>
impl<L> Sync for InferResult<L>
impl<L> Unpin for InferResult<L>
impl<L> UnsafeUnpin for InferResult<L>
impl<L> UnwindSafe for InferResult<L>
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