bug fix
This commit is contained in:
@@ -129,7 +129,6 @@ function (n::lifNeuron)(kfn::knowledgeFn)
|
||||
n.v_t1 = n.alpha * n.v_t
|
||||
else
|
||||
n.recSignal = sum(n.wRec .* 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.recSignal
|
||||
n.v_t1 = no_negative!(n.v_t1)
|
||||
@@ -171,7 +170,6 @@ function (n::alifNeuron)(kfn::knowledgeFn)
|
||||
n.v_t1 = n.alpha * n.v_t
|
||||
n.phi = 0
|
||||
else
|
||||
n.z_t = isnothing(n.z_t) ? false : n.z_t
|
||||
n.a = (n.rho * n.a) + ((1 - n.rho) * n.z_t)
|
||||
n.av_th = n.v_th + (n.beta * n.a)
|
||||
n.recSignal = sum(n.wRec .* n.z_i_t) # signal from other neuron that this neuron subscribed
|
||||
@@ -205,7 +203,7 @@ function (n::linearNeuron)(kfn::T) where T<:knowledgeFn
|
||||
n.timeStep = kfn.timeStep
|
||||
|
||||
# pulling other neuron's firing status at time t
|
||||
n.z_i_t = getindex(kfn.firedNeurons_t0, n.subscriptionList)
|
||||
n.z_i_t = getindex(kfn.firedNeurons_t1, n.subscriptionList)
|
||||
|
||||
if n.refractoryCounter != 0
|
||||
n.refractoryCounter -= 1
|
||||
@@ -217,13 +215,13 @@ function (n::linearNeuron)(kfn::T) where T<:knowledgeFn
|
||||
|
||||
# decay of v_t1
|
||||
n.v_t1 = n.alpha * n.v_t
|
||||
n.vError = n.v_t1
|
||||
else
|
||||
n.recSignal = sum(n.wRec .* 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.recSignal
|
||||
n.v_t1 = no_negative!(n.v_t1)
|
||||
|
||||
n.vError = n.v_t1
|
||||
if n.v_t1 > n.v_th
|
||||
n.z_t1 = true
|
||||
n.refractoryCounter = n.refractoryDuration
|
||||
|
||||
Reference in New Issue
Block a user