This commit is contained in:
2023-05-11 10:32:49 +07:00
parent 7c4a0dfa6f
commit c6055dcb86
4 changed files with 45 additions and 18 deletions

View File

@@ -126,6 +126,7 @@ function (n::lif_neuron)(kfn::knowledgeFn)
n.alpha_v_t = n.alpha * n.v_t
n.v_t1 = n.alpha_v_t + n.recurrent_signal
n.v_t1 = no_negative!.(n.v_t1)
if n.v_t1 > n.v_th
n.z_t1 = true
@@ -169,6 +170,7 @@ function (n::alif_neuron)(kfn::knowledgeFn)
n.recurrent_signal = sum(n.w_rec .* n.z_i_t) # signal from other neuron that this neuron subscribed
n.alpha_v_t = n.alpha * n.v_t
n.v_t1 = n.alpha_v_t + n.recurrent_signal
n.v_t1 = no_negative!.(n.v_t1)
if n.v_t1 > n.av_th
n.z_t1 = true
n.refractory_counter = n.refractory_duration