pub struct TwoCompartmentLIFNeuron {
pub u_d: f64,
pub u_s: f64,
pub s_prev: f64,
pub beta1: f64,
pub beta2: f64,
pub gamma: f64,
pub v_th: f64,
}Expand description
TC-LIF — Zhang et al. (2024) two-compartment spiking neuron.
Discrete map (paper Eqs. 10–12, exact ordering U_D → U_S → S):
U_D[t] = U_D[t-1] + beta1 * U_S[t-1] + I[t] - gamma * S[t-1]
U_S[t] = U_S[t-1] + beta2 * U_D[t] - v_th * S[t-1]
S[t] = Theta(U_S[t] - v_th)One external input enters the dendrite; both compartments reset
softly through the delayed spike S[t-1]. beta1 ∈ (-1, 0) and
beta2 ∈ (0, 1) per the paper’s sigmoid parametrisation; the
defaults are the published S-MNIST feedforward profile (Table 5) —
the paper has dataset-specific profiles and no universal default.
Zhang, Yang, Ma, Wu, Li & Tan, AAAI 38(15):16838, 2024.
Fields§
§u_d: f64§u_s: f64§s_prev: f64§beta1: f64§beta2: f64§gamma: f64§v_th: f64Implementations§
Source§impl TwoCompartmentLIFNeuron
impl TwoCompartmentLIFNeuron
fn valid(&self) -> bool
Sourcepub fn try_step(&mut self, i_ext: f64) -> Result<i32, &'static str>
pub fn try_step(&mut self, i_ext: f64) -> Result<i32, &'static str>
Advance one step after validating the input and configuration.
Computes the paper map on candidates and commits only on success:
a non-finite input, a configuration outside the public bounds, or
a non-finite candidate returns Err with the pre-step state
preserved exactly.
Trait Implementations§
Source§impl Clone for TwoCompartmentLIFNeuron
impl Clone for TwoCompartmentLIFNeuron
Source§impl Debug for TwoCompartmentLIFNeuron
impl Debug for TwoCompartmentLIFNeuron
Auto Trait Implementations§
impl Freeze for TwoCompartmentLIFNeuron
impl RefUnwindSafe for TwoCompartmentLIFNeuron
impl Send for TwoCompartmentLIFNeuron
impl Sync for TwoCompartmentLIFNeuron
impl Unpin for TwoCompartmentLIFNeuron
impl UnsafeUnpin for TwoCompartmentLIFNeuron
impl UnwindSafe for TwoCompartmentLIFNeuron
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.