add neuroplasticity
This commit is contained in:
13
src/learn.jl
13
src/learn.jl
@@ -54,8 +54,7 @@ function learn!(kfn::kfn_1, correctAnswer::AbstractVector)
|
||||
n.wRec .*= nonFlipedSign
|
||||
|
||||
synapticConnStrength!(n)
|
||||
#TODO neuroplasticity
|
||||
println("")
|
||||
neuroplasticity!(n, kfn.firedNeurons, kfn.nExInType)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -68,17 +67,9 @@ function learn!(kfn::kfn_1, correctAnswer::AbstractVector)
|
||||
n.wRec .*= nonFlipedSign # set weight that fliped sign to 0 for random new connection
|
||||
|
||||
synapticConnStrength!(n)
|
||||
#TODO neuroplasticity
|
||||
neuroplasticity!(n, kfn.firedNeurons, kfn.nExInType)
|
||||
end
|
||||
|
||||
|
||||
resetLearningParams!(n)
|
||||
|
||||
# clear variables
|
||||
kfn.firedNeurons = Vector{Int64}()
|
||||
kfn.firedNeurons_t0 = Vector{Bool}()
|
||||
kfn.firedNeurons_t1 = Vector{Bool}()
|
||||
|
||||
kfn.learningStage = "inference"
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user