change how to random neuron's initial weight

This commit is contained in:
ton
2023-08-26 17:19:22 +07:00
parent 3ca52b03f5
commit bf78ca5086
3 changed files with 3 additions and 62 deletions

View File

@@ -376,8 +376,8 @@ function wRec(row, col, n, synapticConnectionNumber)
end
# 10% of neuron connection should be enough to start to make neuron fires
should_be_avg_weight = 1 / (0.1 * synapticConnectionNumber)
w = w .* (should_be_avg_weight / maximum(w)) # adjust overall weight
avgWeight = sum(w)/length(w)
w = w .* (0.1 / avgWeight) # adjust overall weight
return w #(row, col, n)
end
@@ -423,8 +423,6 @@ end