pub struct PlasticityEngine {
pub ewc: EwcPlusPlusBackend,
pub btsp: Option<BtspBackend>,
pub default_mode: PlasticityMode,
}Expand description
The unified plasticity engine.
Fields§
§ewc: EwcPlusPlusBackendEWC++ is always present (canonical production backend)
btsp: Option<BtspBackend>Optional BTSP for biological one-shot plasticity
default_mode: PlasticityModeDefault mode for new weight updates
Implementations§
Source§impl PlasticityEngine
impl PlasticityEngine
pub fn new(lambda: f32) -> Self
pub fn with_btsp(self) -> Self
Sourcepub fn consolidate_with_phi(
&mut self,
weight_id: WeightId,
weights: Vec<f32>,
phi: f32,
)
pub fn consolidate_with_phi( &mut self, weight_id: WeightId, weights: Vec<f32>, phi: f32, )
Set Φ-based protection weight for a consolidated pattern. phi > 1.0 protects the pattern more strongly from forgetting.
Sourcepub fn compute_delta(
&mut self,
weight_id: WeightId,
current: &[f32],
gradient: &[f32],
lr: f32,
mode: Option<PlasticityMode>,
) -> PlasticityDelta
pub fn compute_delta( &mut self, weight_id: WeightId, current: &[f32], gradient: &[f32], lr: f32, mode: Option<PlasticityMode>, ) -> PlasticityDelta
Compute update delta for a weight, routing to appropriate backend.
Auto Trait Implementations§
impl Freeze for PlasticityEngine
impl RefUnwindSafe for PlasticityEngine
impl Send for PlasticityEngine
impl Sync for PlasticityEngine
impl Unpin for PlasticityEngine
impl UnsafeUnpin for PlasticityEngine
impl UnwindSafe for PlasticityEngine
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