fun normalizeExcitatoryFanIn() { var sum = 0.0 var str = 0.0 run { var i = 0 val n: Int = fanIn.size() while (i < n) { str = fanIn.get(i).getStrength() if (str > 0) { sum += str } i++ } } var s: Synapse? = null var i = 0 val n: Int = fanIn.size() while (i < n) { s = fanIn.get(i) str = s.getStrength() if (str > 0) { s.setStrength(s.getStrength() / sum) } i++ } }
Normalizes the excitatory synaptic strengths impinging on this neuron , that is finds the sum of the exctiatory weights and divides each weight value by that sum ;