diff --git a/src/IronpenGPU.jl b/src/IronpenGPU.jl index ec02dec..6af6e96 100644 --- a/src/IronpenGPU.jl +++ b/src/IronpenGPU.jl @@ -28,7 +28,7 @@ using .interface """ version 0.0.9 Todo: [DONE] change madel error calculation in user script, (progress based) - [1*] +W 90% of most active conn + [DONE] +W 90% of most active conn [2] -W 10% of less active conn [3] synapse reconnect delay counter [-] add temporal summation in addition to already used spatial summation. diff --git a/src/forward.jl b/src/forward.jl index 10507c0..8e85723 100644 --- a/src/forward.jl +++ b/src/forward.jl @@ -320,6 +320,7 @@ function lifForward( zit, if synapseReconnectDelay[i1,i2,i3,i4] == 0 # mark timestep synapseReconnectDelay[i1,i2,i3,i4] = sum(timeStep) + wRec[i1,i2,i3,i4] = -1.0 # mark for reconnect end end @@ -526,6 +527,7 @@ function alifForward( zit, synapseReconnectDelay[i1,i2,i3,i4] -= 1 if synapseReconnectDelay[i1,i2,i3,i4] == 0 synapseReconnectDelay[i1,i2,i3,i4] = sum(timeStep) + wRec[i1,i2,i3,i4] = -1.0 # mark for reconnect end end # voltage regulator diff --git a/src/learn.jl b/src/learn.jl index 0980b6f..5b5e721 100644 --- a/src/learn.jl +++ b/src/learn.jl @@ -607,7 +607,6 @@ function neuroplasticity(synapseConnectionNumber, mask_2 .*= 1 .+ eta # minor activity synapse weight will be reduced by eta wRec .*= mask_2 - #WORKING should i -w only for activated synapse only or ALL synapse. activated synapse representing this signal e.g. number 3 # -w, synapse with less than 10% of avg activity get reduced weight by eta mask_less = isless.(synapticActivityCounter, lowerlimit) # 1st criteria @@ -616,14 +615,16 @@ function neuroplasticity(synapseConnectionNumber, wRec .*= mask_3 # -w all non-fire connection except mature connection - mask_notmature = isless.(wRec, 0.1) # 2nd criteria, weak synapse has weight < 0.1 + mask_notmature = isless.(wRec, 0.1) # 2nd criteria, not mature synapse has weight < 0.1 mask_1 = alltrue.(mask_inactiveSynapse, mask_notmature) mask_1 .*= 1 .- eta wRec .*= mask_1 # prune weak connection + # mark weak / negative synaptic connection so they will get randomed in neuroplasticity() + wRec = GeneralUtils.replaceBetween.(wRec, 0.0, 0.01, -1.0) # mark with -1.0 - # rewire synapse connection + #WORKING rewire synapse connection elseif progress == 0 # no progress, no weight update, only rewire