synaptic connection strength concept
This commit is contained in:
16
src/learn.jl
16
src/learn.jl
@@ -65,7 +65,7 @@ function learn!(kfn::kfn_1, correctAnswer::AbstractVector)
|
||||
outs = [n.z_t1 for n in kfn.outputNeuronsArray]
|
||||
for (i, out) in enumerate(outs)
|
||||
if out != correctAnswer[i] # need to adjust weight
|
||||
kfnError = (kfn.outputNeuronsArray[i].v_th - kfn.outputNeuronsArray[i].v_t) *
|
||||
kfnError = (kfn.outputNeuronsArray[i].v_th - kfn.outputNeuronsArray[i].v_t1) *
|
||||
100 / kfn.outputNeuronsArray[i].v_th
|
||||
|
||||
# Threads.@threads for n in kfn.neuronsArray
|
||||
@@ -87,15 +87,9 @@ function learn!(kfn::kfn_1, correctAnswer::AbstractVector)
|
||||
LinearAlgebra.normalize!(n.wRec, 1)
|
||||
n.wRec .*= nonFlipedSign # set weight that fliped sign to 0 for random new connection
|
||||
|
||||
# Threads.@threads for n in kfn.neuronsArray
|
||||
for n in kfn.neuronsArray
|
||||
#WORKING synapticConnStrength
|
||||
|
||||
|
||||
|
||||
#TODO neuroplasticity
|
||||
end
|
||||
|
||||
synapticConnStrength!(n)
|
||||
#TODO neuroplasticity
|
||||
println("")
|
||||
end
|
||||
|
||||
for n in kfn.outputNeuronsArray # merge wRecChange into wRec
|
||||
@@ -105,7 +99,7 @@ function learn!(kfn::kfn_1, correctAnswer::AbstractVector)
|
||||
LinearAlgebra.normalize!(n.wRec, 1)
|
||||
n.wRec .*= nonFlipedSign # set weight that fliped sign to 0 for random new connection
|
||||
|
||||
#TODO synapticConnStrength
|
||||
synapticConnStrength!(n)
|
||||
#TODO neuroplasticity
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user