From 0af39ee09edad8804842ac656147ed5254627fed Mon Sep 17 00:00:00 2001 From: ton Date: Sun, 20 Aug 2023 05:45:36 +0700 Subject: [PATCH] small fix --- src/type.jl | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/type.jl b/src/type.jl index 415c556..516b900 100644 --- a/src/type.jl +++ b/src/type.jl @@ -193,7 +193,8 @@ function kfn_1(params::Dict; device=cpu) for slice in eachslice(w, dims=3) pool = shuffle!([1:row*col...])[1:synapticConnection] for i in pool - slice[i] = randn()/10 # assign weight to synaptic connection, start small + slice[i] = randn()/10 # assign weight to synaptic connection. /10 to start small, + # otherwise RSNN's vt Usually stay negative (-) end end # project 3D w into 4D kfn.lif_wRec (row, col, n, batch) @@ -242,7 +243,8 @@ function kfn_1(params::Dict; device=cpu) for slice in eachslice(w, dims=3) pool = shuffle!([1:row*col...])[1:synapticConnection] for i in pool - slice[i] = randn()/10 # assign weight to synaptic connection + slice[i] = randn()/10 # assign weight to synaptic connection. /10 to start small, + # otherwise RSNN's vt Usually stay negative (-) end end # project 3D w into 4D kfn.alif_wRec @@ -308,7 +310,8 @@ function kfn_1(params::Dict; device=cpu) # pool must contain only lif, alif neurons pool = shuffle!([startInd:row*col...])[1:synapticConnection] for i in pool - slice[i] = randn()/10 # assign weight to synaptic connection + slice[i] = randn()/10 # assign weight to synaptic connection. /10 to start small, + # otherwise RSNN's vt Usually stay negative (-) end end # project 3D w into 4D kfn.lif_wOut (row, col, n, batch)