Skip to content

Commit

Permalink
Merge pull request #27 from ORNL/issue_26
Browse files Browse the repository at this point in the history
Fixed: STDP sigma and w_max params were hardcoded
  • Loading branch information
chathika authored Jul 31, 2024
2 parents 1f2d21a + f4dea61 commit 4e59594
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions superneuroabm/neuron.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,8 @@ def synapse_with_stdp_step_func(
A_neg = output_synapse_learning_params[2] # 0.3
tau_pos = output_synapse_learning_params[3] # 8
tau_neg = output_synapse_learning_params[4] # 5
sigma = output_synapse_learning_params[5] # 0.8 # weight change rate
w_max = output_synapse_learning_params[6] # 1000

presynaptic_spikes = output_spikess[my_idx]
postsynaptic_spikes = output_spikess[int(out_neuron_id)]
Expand All @@ -213,8 +215,6 @@ def synapse_with_stdp_step_func(
A_neg * math.exp(delta_t / tau_neg) * post_to_pre_correlation
)
w_old = weight
sigma = 0.8 # weight change rate
w_max = 1000
if delta_w > 0:
w_new = w_old + sigma * delta_w * (w_max - w_old)
else:
Expand Down

0 comments on commit 4e59594

Please sign in to comment.