Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed: STDP sigma and w_max params were hardcoded #27

Merged
merged 1 commit into from
Jul 31, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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