add neuroplasticity for output neuron

This commit is contained in:
2023-05-21 15:55:40 +07:00
parent 4522d10142
commit d3d47d1114
5 changed files with 54 additions and 17 deletions

View File

@@ -190,17 +190,17 @@ function kfn_1(kfnParams::Dict)
throw(error("number of compute neuron must be greater than input neuron"))
end
# Bn
if kfn.kfnParams[:Bn] == "random"
kfn.Bn = [Random.rand(0:0.001:1) for i in 1:kfn.kfnParams[:computeNeuronNumber]]
else # in case I want to specify manually
kfn.Bn = [kfn.kfnParams[:Bn] for i in 1:kfn.kfnParams[:computeNeuronNumber]]
end
# # Bn
# if kfn.kfnParams[:Bn] == "random"
# kfn.Bn = [Random.rand(0:0.001:1) for i in 1:kfn.kfnParams[:computeNeuronNumber]]
# else # in case I want to specify manually
# kfn.Bn = [kfn.kfnParams[:Bn] for i in 1:kfn.kfnParams[:computeNeuronNumber]]
# end
# assign neurons ID by their position in kfn.neurons array because I think it is
# straight forward way
# add input port
# add input port, it must be added before any other neuron types
for (k, v) in kfn.kfnParams[:inputPort]
current_type = kfn.kfnParams[:inputPort][k]
for i = 1:current_type[:numbers]