fix neuroplasticity error
This commit is contained in:
@@ -370,14 +370,14 @@ function wRec(row, col, n, synapticConnectionNumber)
|
||||
for slice in eachslice(w, dims=3)
|
||||
pool = shuffle!([1:row*col...])[1:synapticConnectionNumber]
|
||||
for i in pool
|
||||
slice[i] = rand() # assign weight to synaptic connection. /10 to start small,
|
||||
slice[i] = rand(0.01:0.01:0.1) # assign weight to synaptic connection. /10 to start small,
|
||||
# otherwise RSNN's vt Usually stay negative (-)
|
||||
end
|
||||
end
|
||||
|
||||
# 10% of neuron connection should be enough to start to make neuron fires
|
||||
avgWeight = sum(w)/length(w)
|
||||
w = w .* (0.1 / avgWeight) # adjust overall weight
|
||||
w = w .* (0.01 / avgWeight) # adjust overall weight
|
||||
|
||||
return w #(row, col, n)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user