refractoring

This commit is contained in:
2023-05-22 14:10:13 +07:00
parent d3d47d1114
commit 1d807663c3

View File

@@ -28,7 +28,7 @@ function learn!(kfn::kfn_1, correctAnswer::AbstractVector)
for (i, out) in enumerate(outs) for (i, out) in enumerate(outs)
if out != correctAnswer[i] # need to adjust weight if out != correctAnswer[i] # need to adjust weight
kfnError = ( (kfn.outputNeuronsArray[i].v_th - kfn.outputNeuronsArray[i].vError) * kfnError = ( (kfn.outputNeuronsArray[i].v_th - kfn.outputNeuronsArray[i].vError) *
100 / kfn.outputNeuronsArray[i].v_th ) * 0.1 # 0.1 for scaling down error 100 / kfn.outputNeuronsArray[i].v_th )
Threads.@threads for n in kfn.neuronsArray Threads.@threads for n in kfn.neuronsArray
# for n in kfn.neuronsArray # for n in kfn.neuronsArray