refractoring
This commit is contained in:
@@ -34,9 +34,9 @@ using .interface
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
Todo:
|
Todo:
|
||||||
[9] verify that model can complete learning cycle with no error
|
[3] verify that model can complete learning cycle with no error
|
||||||
[*5] synaptic connection strength concept. use sigmoid, turn connection offline
|
[*1] synaptic connection strength concept. use sigmoid, turn connection offline
|
||||||
[8] neuroplasticity() i.e. change connection
|
[2] neuroplasticity() i.e. change connection
|
||||||
[] using RL to control learning signal
|
[] using RL to control learning signal
|
||||||
[] consider using Dates.now() instead of timestamp because time_stamp may overflow
|
[] consider using Dates.now() instead of timestamp because time_stamp may overflow
|
||||||
[] training should include adjusting α, neuron membrane potential decay factor
|
[] training should include adjusting α, neuron membrane potential decay factor
|
||||||
|
|||||||
@@ -87,11 +87,15 @@ function learn!(kfn::kfn_1, correctAnswer::AbstractVector)
|
|||||||
LinearAlgebra.normalize!(n.wRec, 1)
|
LinearAlgebra.normalize!(n.wRec, 1)
|
||||||
n.wRec .*= nonFlipedSign # set weight that fliped sign to 0 for random new connection
|
n.wRec .*= nonFlipedSign # set weight that fliped sign to 0 for random new connection
|
||||||
|
|
||||||
#WORKING synapticConnStrength
|
# Threads.@threads for n in kfn.neuronsArray
|
||||||
|
for n in kfn.neuronsArray
|
||||||
|
#WORKING synapticConnStrength
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#TODO neuroplasticity
|
#TODO neuroplasticity
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
for n in kfn.outputNeuronsArray # merge wRecChange into wRec
|
for n in kfn.outputNeuronsArray # merge wRecChange into wRec
|
||||||
|
|||||||
@@ -291,9 +291,9 @@ end
|
|||||||
"""
|
"""
|
||||||
function synapticConnStrength(currentStrength::AbstractFloat, bias::Number=0)
|
function synapticConnStrength(currentStrength::AbstractFloat, bias::Number=0)
|
||||||
currentStrength += bias
|
currentStrength += bias
|
||||||
currentStrength - (1.0 - sigmoid(currentStrength))
|
updatedStrength - (1.0 - sigmoid(currentStrength))
|
||||||
currentStrength -= bias
|
updatedStrength -= bias
|
||||||
return currentStrength
|
return updatedStrength
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user