pub struct SpikeNetFixedConfig {
pub n_input: usize,
pub n_hidden: usize,
pub n_output: usize,
pub alpha: i16,
pub kappa: i16,
pub kappa_out: i16,
pub eta: i16,
pub v_thr: i16,
pub gamma: i16,
pub spike_threshold: i16,
pub seed: u64,
pub weight_init_range: i16,
}Available on crate feature
alloc only.Expand description
Configuration for a SpikeNetFixed network.
All Q1.14 parameters should be in the range [-2.0, +2.0) when converted
from f64 via f64_to_q14(). Typical defaults:
| Parameter | f64 | Q1.14 |
|---|---|---|
| alpha | 0.95 | 15565 |
| kappa | 0.99 | 16220 |
| kappa_out | 0.90 | 14746 |
| eta | 0.001 | 16 |
| v_thr | 0.50 | 8192 |
| gamma | 0.30 | 4915 |
| spike_threshold | 0.05 | 819 |
Fields§
§n_input: usizeNumber of raw input features (encoded to 2x for spike channels).
Number of hidden LIF neurons.
n_output: usizeNumber of output readout neurons.
alpha: i16Membrane decay factor in Q1.14.
kappa: i16Eligibility trace decay factor in Q1.14.
kappa_out: i16Readout membrane decay factor in Q1.14.
eta: i16Learning rate in Q1.14.
v_thr: i16Firing threshold in Q1.14.
gamma: i16Surrogate gradient dampening factor in Q1.14.
spike_threshold: i16Delta encoding threshold in Q1.14.
seed: u64PRNG seed for reproducible weight initialization.
weight_init_range: i16Weight initialization range: weights sampled from [-range, +range] in Q1.14.
Trait Implementations§
Source§impl Clone for SpikeNetFixedConfig
impl Clone for SpikeNetFixedConfig
Source§fn clone(&self) -> SpikeNetFixedConfig
fn clone(&self) -> SpikeNetFixedConfig
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 SpikeNetFixedConfig
impl Debug for SpikeNetFixedConfig
Auto Trait Implementations§
impl Freeze for SpikeNetFixedConfig
impl RefUnwindSafe for SpikeNetFixedConfig
impl Send for SpikeNetFixedConfig
impl Sync for SpikeNetFixedConfig
impl Unpin for SpikeNetFixedConfig
impl UnsafeUnpin for SpikeNetFixedConfig
impl UnwindSafe for SpikeNetFixedConfig
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