update version
This commit is contained in:
14
src/types.jl
14
src/types.jl
@@ -346,7 +346,7 @@ Base.@kwdef mutable struct lifNeuron <: computeNeuron
|
||||
delta::Float64 = 1.0 # δ, discreate timestep size in millisecond
|
||||
refractoryDuration::Int64 = 3 # neuron's refratory period in millisecond
|
||||
refractoryCounter::Int64 = 0
|
||||
tau_m::Float64 = 50.0 # τ_m, membrane time constant in millisecond
|
||||
tau_m::Float64 = 100.0 # τ_m, membrane time constant in millisecond
|
||||
eta::Float64 = 0.01 # η, learning rate
|
||||
wRecChange::Array{Float64} = Float64[] # Δw_rec, cumulated wRec change
|
||||
recSignal::Float64 = 0.0 # incoming recurrent signal
|
||||
@@ -440,7 +440,7 @@ Base.@kwdef mutable struct alifNeuron <: computeNeuron
|
||||
phi::Float64 = 0.0 # ϕ, psuedo derivative
|
||||
refractoryDuration::Int64 = 3 # neuron's refractory period in millisecond
|
||||
refractoryCounter::Int64 = 0
|
||||
tau_m::Float64 = 50.0 # τ_m, membrane time constant in millisecond
|
||||
tau_m::Float64 = 100.0 # τ_m, membrane time constant in millisecond
|
||||
wRecChange::Array{Float64} = Float64[] # Δw_rec, cumulated wRec change
|
||||
recSignal::Float64 = 0.0 # incoming recurrent signal
|
||||
alpha_v_t::Float64 = 0.0 # alpha * v_t
|
||||
@@ -453,7 +453,7 @@ Base.@kwdef mutable struct alifNeuron <: computeNeuron
|
||||
firingRateError::Float64 = 0.0 # local neuron error w.r.t. firing regularization
|
||||
firingRate::Float64 = 0.0 # running average of firing rate, Hz
|
||||
|
||||
tau_a::Float64 = 50.0 # τ_a, adaption time constant in millisecond
|
||||
tau_a::Float64 = 100.0 # τ_a, adaption time constant in millisecond
|
||||
beta::Float64 = 0.15 # β, constant, value from paper
|
||||
rho::Float64 = 0.0 # ρ, threshold adaptation decay factor
|
||||
a::Float64 = 0.0 # threshold adaptation
|
||||
@@ -544,7 +544,7 @@ Base.@kwdef mutable struct linearNeuron <: outputNeuron
|
||||
delta::Float64 = 1.0 # δ, discreate timestep size in millisecond
|
||||
refractoryDuration::Int64 = 3 # neuron's refratory period in millisecond
|
||||
refractoryCounter::Int64 = 0
|
||||
tau_out::Float64 = 25.0 # τ_out, membrane time constant in millisecond
|
||||
tau_out::Float64 = 50.0 # τ_out, membrane time constant in millisecond
|
||||
eta::Float64 = 0.01 # η, learning rate
|
||||
wRecChange::Array{Float64} = Float64[] # Δw_rec, cumulated wRec change
|
||||
recSignal::Float64 = 0.0 # incoming recurrent signal
|
||||
@@ -637,7 +637,7 @@ function init_neuron!(id::Int64, n::lifNeuron, n_params::Dict, kfnParams::Dict)
|
||||
n.synapticStrength = rand(-5:0.01:-4, length(n.subscriptionList))
|
||||
|
||||
n.epsilonRec = zeros(length(n.subscriptionList))
|
||||
n.wRec = rand(-0.2:0.01:0.2, length(n.subscriptionList))
|
||||
n.wRec = randn(length(n.subscriptionList))
|
||||
n.wRecChange = zeros(length(n.subscriptionList))
|
||||
n.alpha = calculate_α(n)
|
||||
n.z_i_t_commulative = zeros(length(n.subscriptionList))
|
||||
@@ -657,7 +657,7 @@ function init_neuron!(id::Int64, n::alifNeuron, n_params::Dict,
|
||||
n.synapticStrength = rand(-5:0.01:-4, length(n.subscriptionList))
|
||||
|
||||
n.epsilonRec = zeros(length(n.subscriptionList))
|
||||
n.wRec = rand(-0.2:0.01:0.2, length(n.subscriptionList))
|
||||
n.wRec = randn(length(n.subscriptionList))
|
||||
n.wRecChange = zeros(length(n.subscriptionList))
|
||||
|
||||
# the more time has passed from the last time neuron was activated, the more
|
||||
@@ -680,7 +680,7 @@ function init_neuron!(id::Int64, n::linearNeuron, n_params::Dict, kfnParams::Dic
|
||||
n.synapticStrength = rand(-5:0.01:-4, length(n.subscriptionList))
|
||||
|
||||
n.epsilonRec = zeros(length(n.subscriptionList))
|
||||
n.wRec = rand(-0.2:0.01:0.2, length(n.subscriptionList))
|
||||
n.wRec = randn(length(n.subscriptionList))
|
||||
n.wRecChange = zeros(length(n.subscriptionList))
|
||||
n.alpha = calculate_k(n)
|
||||
n.z_i_t_commulative = zeros(length(n.subscriptionList))
|
||||
|
||||
Reference in New Issue
Block a user