add normalizePeak!

This commit is contained in:
2023-05-17 13:20:03 +07:00
parent b7c674916e
commit abd69c9dae
3 changed files with 19 additions and 5 deletions

View File

@@ -630,7 +630,7 @@ function init_neuron!(id::Int64, n::lif_neuron, n_params::Dict, kfnParams::Dict)
n.synapticStrength = rand(-5:0.1:-3, length(n.subscriptionList))
n.epsilonRec = zeros(length(n.subscriptionList))
n.wRec = LinearAlgebra.normalize!(rand(length(n.subscriptionList)), 1)
n.wRec = rand(length(n.subscriptionList))
n.wRecChange = zeros(length(n.subscriptionList))
n.alpha = calculate_α(n)
end
@@ -649,7 +649,7 @@ function init_neuron!(id::Int64, n::alif_neuron, n_params::Dict,
n.synapticStrength = rand(-5:0.1:-3, length(n.subscriptionList))
n.epsilonRec = zeros(length(n.subscriptionList))
n.wRec = LinearAlgebra.normalize!(rand(length(n.subscriptionList)), 1)
n.wRec = rand(length(n.subscriptionList))
n.wRecChange = zeros(length(n.subscriptionList))
# the more time has passed from the last time neuron was activated, the more
@@ -671,7 +671,7 @@ function init_neuron!(id::Int64, n::linear_neuron, n_params::Dict, kfnParams::Di
n.synapticStrength = rand(-5:0.1:-3, length(n.subscriptionList))
n.epsilonRec = zeros(length(n.subscriptionList))
n.wRec = LinearAlgebra.normalize!(rand(length(n.subscriptionList)), 1)
n.wRec = rand(length(n.subscriptionList))
n.wRecChange = zeros(length(n.subscriptionList))
n.alpha = calculate_k(n)
end