small fix

This commit is contained in:
ton
2023-08-20 05:45:36 +07:00
parent f656c62266
commit 0af39ee09e

View File

@@ -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)