dev
This commit is contained in:
@@ -470,7 +470,7 @@ function neuroplasticity(synapseConnectionNumber,
|
||||
|
||||
# rewire synapse connection
|
||||
rewireSynapse!(wRec, neuronInactivityCounter, synapticActivityCounter,
|
||||
synapseReconnectDelay, zitCumulative)
|
||||
synapseReconnectDelay, synapseConnectionNumber, zitCumulative)
|
||||
# error("DEBUG -> neuroplasticity 1")
|
||||
elseif progress == 0 # no progress, no weight update, only rewire
|
||||
# -w all non-fire connection except mature connection
|
||||
@@ -481,7 +481,7 @@ function neuroplasticity(synapseConnectionNumber,
|
||||
|
||||
# rewire synapse connection
|
||||
rewireSynapse!(wRec, neuronInactivityCounter, synapticActivityCounter,
|
||||
synapseReconnectDelay, zitCumulative)
|
||||
synapseReconnectDelay, synapseConnectionNumber, zitCumulative)
|
||||
|
||||
# error("DEBUG -> neuroplasticity")
|
||||
else
|
||||
|
||||
@@ -119,8 +119,8 @@ function growRepeatedPath!(wRec, synapticActivityCounter, eta)
|
||||
# seperate active synapse out of inactive in this signal
|
||||
mask_activeSynapse = (!isequal).(synapticActivityCounter, 0)
|
||||
|
||||
# adjust weight based on vt progress and repeatition (80% +w, 20% -w) depend on epsilonRec
|
||||
mask_more, mask_less, _ = rankMatrix(synapticActivityCounter, 0.2) # sort synapse from highest to lowest activity
|
||||
# adjust weight based on vt progress and repeatition (40% +w, 60% -w) depend on epsilonRec
|
||||
mask_more, mask_less, _ = rankMatrix(synapticActivityCounter, 0.6) # sort synapse from highest to lowest activity
|
||||
|
||||
# +w, synapse with more than 10% of avg activity get increase weight by eta
|
||||
# mask_more = (!isless).(synapticActivityCounter, lowerlimit)
|
||||
@@ -165,8 +165,9 @@ end
|
||||
function rewireSynapse!(wRec::AbstractArray, neuronInactivityCounter::AbstractArray,
|
||||
synapticActivityCounter::AbstractArray,
|
||||
synapseReconnectDelay::AbstractArray,
|
||||
synapseConnectionNumber::Integer,
|
||||
zitCumulative::AbstractArray)
|
||||
_,_,i3,i4 = size(wRec)
|
||||
i1,i2,i3,i4 = size(wRec)
|
||||
for n in 1:i3 # neuron-by-neuron
|
||||
if neuronInactivityCounter[1,1,n,i4][1] < -100000 # neuron die i.e. reset all weight
|
||||
println("neuron $n die")
|
||||
|
||||
Reference in New Issue
Block a user