norse.torch.functional.stdp#
Functions
|
STDP step for a conv2d LIF layer. Input: z_pre (torch.tensor): Presynaptic activity z: {0,1} -> {no spike, spike} z_post (torch.tensor): Postsynaptic activity z: {0,1} -> {no spike, spike} w (torch.Tensor): Weight tensor connecting the pre- and postsynaptic layers state_stdp (STDPState): STDP state p_stdp (STDPParameters): Parameters of STDP dt (float): Time-resolution Output: w (torch.tensor): Updated synaptic weights state_stdp (STDPState): Updated STDP state. |
|
STDP step for a FF LIF layer. Input: z_pre (torch.Tensor): Presynaptic activity z: {0,1} -> {no spike, spike} z_post (torch.Tensor): Postsynaptic activity z: {0,1} -> {no spike, spike} w (torch.Tensor): Weight tensor connecting the pre- and postsynaptic layers state_stdp (STDPState): STDP state p_stdp (STDPParameters): Parameters of STDP dt (float): Time-resolution Output: w (torch.tensor): Updated synaptic weights state_stdp (STDPState): Updated STDP state. |
Classes
|
STDP parameters. Parameters: a_pre (torch.Tensor): Contribution of presynaptic spikes to trace a_post (torch.Tensor): Contribution of postsynaptic spikes to trace tau_pre_inv (torch.Tensor): Inverse decay time constant of presynaptic spike trace in 1/s tau_post_inv (torch.Tensor): Inverse decay time constant of postsynaptic spike trace in 1/s w_min (torch.Tensor): Lower bound on synaptic weights (should be < w_max) w_max (torch.Tensor): Upper bound on synaptic weight (should be > w_min) eta_plus (torch.Tensor): Learning rate for synaptic potentiation (0 < eta_plus << 1) eta_minus (torch.Tensor): Learning rate for synaptic depression (0 < eta_minus << 1) stdp_algorithm (string): Algorithm for STDP updates. Options in {"additive","additive_step","multiplicative_pow","multiplicative_relu"} mu (torch.Tensor): Exponent for multiplicative STDP (0 <= mu <= 1) hardbound (boolean): Impose hardbounds by clipping (recommended unles eta_* << 1) convolutional (boolean): Convolutional weighting kernel stride (int): Stride for convolution padding (int): Padding for convolution dilation (int): Dilation for convolution. |
|
State of spike-timing-dependent plasticity (STDP). Parameters: t_pre (torch.Tensor): presynaptic spike trace t_post (torch.Tensor): postsynaptic spike trace. |