bug fix synapticConnStrength!()

This commit is contained in:
2023-05-18 11:14:50 +07:00
parent d1fe518739
commit 7db310d465
4 changed files with 33 additions and 12 deletions

View File

@@ -49,9 +49,9 @@ function learn!(kfn::kfn_1, correctAnswer::AbstractVector)
wSign_1 = sign.(n.wRec) # check for fliped sign, 1 indicates non-fliped sign
nonFlipedSign = isequal.(wSign_0, wSign_1) # 1 not fliped, 0 fliped
# normalize wRec peak to prevent input signal overwhelming neuron
normalizePeak!(n.wRec, 2)
n.wRec .*= nonFlipedSign # set weight that fliped sign to 0 for random new connection
normalizePeak!(n.wRec, n.wRecChange, 2)
# set weight that fliped sign to 0 for random new connection
n.wRec .*= nonFlipedSign
synapticConnStrength!(n)
#TODO neuroplasticity