refractoring
This commit is contained in:
@@ -260,7 +260,7 @@ end
|
||||
one may use bias = -5 to transform synaptic strength into range -5 to 5
|
||||
the return value is shifted back to original scale
|
||||
"""
|
||||
function synapticConnStrength(currentStrength::AbstractFloat, updown::String, bias::Number=0)
|
||||
function synapticConnStrength(currentStrength::AbstractFloat, updown::String, bias::Number=0)::Float64
|
||||
currentStrength += bias
|
||||
if currentStrength > 0
|
||||
Δstrength = (1.0 - sigmoid(currentStrength))
|
||||
@@ -274,7 +274,7 @@ function synapticConnStrength(currentStrength::AbstractFloat, updown::String, bi
|
||||
updatedStrength = currentStrength - Δstrength
|
||||
end
|
||||
updatedStrength -= bias
|
||||
return updatedStrength
|
||||
return updatedStrength
|
||||
end
|
||||
|
||||
""" Compute all synaptic connection strength of a neuron. Also mark n.wRec to 0 if wRec goes
|
||||
|
||||
Reference in New Issue
Block a user